Tags

, ,

When running the node.js(expressJS) app using nodemon or supervisor it keeps crashing and restarting.

$ supervisor ./bin/www
crashing child
Starting child process with 'node ./bin/www'
crashing child
Starting child process with 'node ./bin/www'
$ nodemon
[nodemon] 1.11.0
[nodemon] to restart at any time, enter `rs`
[nodemon] watching: *.*
[nodemon] starting `node ./bin/www`
[nodemon] restarting due to changes...
[nodemon] starting `node ./bin/www`

I remember that I have a gulpfile.js in which it generates an angular config file(config.js) on-the-fly and place it inside the public folder.
To solve it, we ignore the folder where the generated file takes place.

$ supervisor --ignore public ./bin/www
$ nodemon --ignore public

Reference: https://github.com/remy/nodemon/issues/763

Advertisements