Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
{
"name": "playground",
"version": "0.0.0",
"description": "",
"main": "server.js",
"dependencies": {
"connect": "~2.11.0",
"connect-compiler": "~0.1.3",
"less": "~1.5.1",
"livereload": "~0.3.2"
},
"devDependencies": {},
"scripts": {
"start": "node server.js"
},
"author": "Tomas Carnecky <tomas.carnecky@gmail.com>",
"license": "BSD-2-Clause"
}
var connect = require('connect')
, compiler = require('connect-compiler')
, livereload = require('livereload');
var server = connect.createServer
( connect.logger()
, compiler({ enabled: ['less'] })
, connect.static(__dirname)
).listen(3000);
var server = livereload.createServer({ debug: true, exts: [ 'less' ] });
server.watch(__dirname);
// The livereload server lets an exception escape to the root
// scope which kills the server. Don't let that happen.
process.on('uncaughtException', function (err) {
console.error(err.stack);
console.log("Node NOT Exiting...");
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment