I am using Roots to develop an app, as I run roots watch
command, then it compiles successfully and opens the localhost:1111
page, but with the error below:
Cannot GET /
This is how my app.coffee file looks like, though I looked for a fix for this in SOF and none of them seemed to work for this case.
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
Is it a different solution since this is CoffeeScript instead of JS?
So it turns out to be the fact that I needed to cd project-name
after I have done roots new project-name
, and then only roots watch
would work.
Such a rookie mistake, but a good lesson.