"Cannot GET /" 使用 Roots 时出错 - CoffeeScript

"Cannot GET /" error using Roots - CoffeeScript

我正在使用Roots开发一个应用程序,作为我运行roots watch命令,然后它编译成功并打开localhost:1111页面,但出现错误下面:

Cannot GET /

这就是我的 app.coffee 文件的样子,尽管我在 SOF 中寻找了解决此问题的方法,其中 none 似乎适用于这个案例。

axis         = require 'axis'
rupture      = require 'rupture'
autoprefixer = require 'autoprefixer-stylus'
js_pipeline  = require 'js-pipeline'
css_pipeline = require 'css-pipeline'

module.exports =
  ignores: ['readme.md', '**/layout.*', '**/_*', '.gitignore', 'ship.*conf']

  extensions: [
    js_pipeline(files: 'assets/js/*.coffee'),
    css_pipeline(files: 'assets/css/*.styl')
  ]

  stylus:
    use: [axis(), rupture(), autoprefixer()]
    sourcemap: true

  'coffee-script':
    sourcemap: true

  jade:
    pretty: true

这是一个不同的解决方案,因为这是 CoffeeScript 而不是 JS?

所以事实证明,我在完成roots new project-name之后需要cd project-name,然后只有roots watch可以工作。

这样的菜鸟错误,但是一个很好的教训。