Sunday 13 March 2016

Is there a way to livereload when working with express.js (without gulp/grunt)

I found express-livereload module but I can't get it to work, this is my codevar express = require('express') , livereload = require('express-livereload') , app = express(); app.set('views', './views'); // specify the views directory app.set('view engine', 'jade'); // register the template engine livereload(app) app.get('/', function(req,res){ res.render('index', {'name': 'aurel kurtula'}) }) var server = app.listen(3000, function(){ console.log('3000') }) But it doesn't work.Any recommendation?

Submitted March 14, 2016 at 02:41AM by relio2014

No comments:

Post a Comment