Cheatsheet - Forever
Forever Cheatsheet
A simple CLI tool for ensuring that a given script runs continuously (i.e. forever).
[+] Installation
You could install forever using npm like this:
sudo npm install -g forever
[+] Commands
And then start your application with:
forever server.js
Or as a service:
forever start server.js
Forever restarts your app when it crashes or stops for some reason. To restrict restarts to 5 you could use:
forever -m5 server.js