Giving lot of tries over the express-generator template with express-livereload.js. It simply does not seem to work as expected,

Whats works best is nodemon instead of node.

$npm install nodemon --save-dev
modify package.json:
"scripts": {
 "start": "node ./bin/www",
 "start-dev": "nodemon ./bin/www"
 },

finally do

$npm run start-dev

Now nodemon will reload the express server everytime a file changes.

Advertisements