I am currently trying to get into NodeJS together with the SailsJS framework.
And I want to use coffeescript on the serverside aswell, but after converting all files in config/*.js
to config/*.coffee
properly with js2coffee, I get the following error when trying to start up the app:
config/400.coffee
SyntaxError: Unexpected token ILLEGAL
pointing to the first character in the file, which is a hashtag for a coffee comment. So it seems the app does not recognize the file as coffeescript, but searching for standard js instead.
I tried installing the package coffee-script
and requireing it in
app.js
require('coffee-script');
require('sails').lift(require('optimist').argv);
but it doesn't help.
If I delete 400.coffee
, the error appears in the next file 403.coffee
etc.
What am I doing wrong? Isn't coffeescript allowed in the config files or am I missing something?