Here's my setup:
gulp, nodemon and livereload npm modules in the project dirgulpfile.js as follows:"use strict"
const gulp = require('gulp')
const nodemon = require('gulp-nodemon')
const livereload = require('gulp-livereload')
gulp.task('default', () => {
livereload.listen()
nodemon({
script: 'app.js',
ext: 'js'
}).on('restart', () => {
gulp.src('app.js')
.pipe(livereload())
})
})
gulp in the project dirnodemon restarts the server on change and the on restart callback runs livereload.
Then the livereload on chrome detects it and reloads the page. Profit! :)
Hope this helps. :)