NodeJS + Forever Scripts


Install Forever package

Download and install forever package/

npm install --save forever

Create two files

Create a start file.

nano /app_dir/

Create a stop file.

nano /app_dir/

Invoke the Forever module (to START our Node.js server).

./node_modules/forever/bin/forever \
	start \
	-al forever.log \
	-ao out.log \
	-ae err.log \

Invoke the Forever module (to STOP our Node.js server).

./node_modules/forever/bin/forever stop ../app.js