ericclemmons / grunt-express-server

Grunt task for running an Express Server that works great with LiveReload + Watch/Regarde
MIT License
248 stars 64 forks source link

Better CoffeeScript Example #76

Closed KevinSheedy closed 9 years ago

KevinSheedy commented 9 years ago

Hi It would be great if there was a more thorough explanation and example of how to use coffeescript in the app. I haven't been able to get it working. Thanks

guifromrio commented 9 years ago

@KevinSheedy can you be more specific? I currently use a "bin/www" script that require('coffee-script/register') and encapsulates this away from whoever is running.

e.g.:

#!/usr/bin/env node
require('coffee-script/register');
var app = require('../app');
var server = app.listen(process.env.PORT || 3000, function() {
  console.log('Express server listening on port ' + server.address().port);
});
guifromrio commented 9 years ago

Please, re-open if you need more info.