【问题标题】:"Cannot GET /" error using Roots - CoffeeScript使用 Roots 的“Cannot GET /”错误 - CoffeeScript
【发布时间】:2016-02-25 03:59:28
【问题描述】:

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

Cannot GET /

这就是我的 app.coffee 文件的样子,尽管我在 SOF 中寻找了解决此问题的方法,但它们似乎都不适用于这种情况。

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?

【问题讨论】:

    标签: node.js get coffeescript connection roots-toolkit


    【解决方案1】:

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-11-19
      • 1970-01-01
      • 1970-01-01
      • 2021-04-05
      • 2020-07-19
      相关资源
      最近更新 更多