Reputation: 88197
I could use connect-assets
to write CoffeeScript and Stylus (CSS) files without compiling and it will do the rest. Is it possible for the server side too? I could write my start my "CoffeeScript" server like:
coffee server.coffee
But I don't think it knows how to interprete CoffeeScript files directly. Is it possible to use purely CoffeeScript? Else, how what is your workflow and folder structure like? I dont want to have coffee
s and js
s all mixed up
Upvotes: 2
Views: 571
Reputation: 1147
Rewrite your application to application.coffee
, then write this to your app.js
:
require('coffee-script');
module.exports = require('./application.coffee');
Then node app.js
will run your server. Off course you have to install coffee-script.
Upvotes: 3
Reputation: 34630
You can just start your server the way you described it. No need to compile it.
coffee app.coffee
Upvotes: 2