edit (18.06.2015): Nowdays I'm using PM2, and here's my post that explains how to use PM2.
Nodemon is a utility that will monitor for any changes in your source and automatically restart your server. Install with npm:
npm install -g nodemon
Forever is a simple CLI tool for ensuring that a given script runs continuously (i.e. forever). Install with npm:
npm install -g forever
forever start nodemon --exitcrash app.js
If you get an error like this:
error: Cannot start forever error: script /home/nikola/nodemon does not exist.
Try to run nodemon with the full path:
forever start /usr/bin/nodemon --exitcrash app.js
You can find out the path to nodemon by executing: