Where place forever-monitor code?
I am trying to set up forever-monitor. I added this to my app.js: var forever = require('forever-monitor'); var child = new(forever.Monitor)('app.js', { max: 3, silent: true, options: [] }); child.on('exit', function() { console.log('app.js has exited after 3 restarts'); }); child.start(); However when I start my application from the command line it logs 'app.js has exited after 3 starts' but it still runs. In which file should this code be placed? Am I missing something about the usage of forever-monitor? Here's how forever-monitor works app_fm.js var forever = require('forever-monitor'); var