Node.js - Development and Deployment

Updated: 2018-12-09

nodemon

nodemon will watch the files in the directory in which nodemon was started, and if any files change, nodemon will automatically restart your node application.

Install nodemon:

$ sudo npm install -g nodemon

pm2

http://pm2.keymetrics.io/

Install pm2:

$ sudo npm install -g pm2

Start production, with max memory:

$ NODE_ENV=production pm2 -f start app.js --max-memory-restart 200M

Monitor

$ pm2 monit