LiveReload and web server - zhentian-wan/MEANAppsFiles GitHub Wiki
Install gulp-connect:
npm install gulp-connect --save-dev
var connect = require('gulp-connect');
gulp.task('connect', connect.server({
root: ['./build'],
open: {browser: 'Google Chrome'}
}));
Every time jade files changed, we want it reloaded:
gulp.task('jade', function() {
return gulp.src('./public/**/*.jade')
.pipe(jade())
.pipe(gulp.dest('./build'))
.pipe(connect.reload()); // add this
});
You can also add this reload to css, stylus and js file. As well as default task.