Node.js Keep a node application constantly running Continuous running with nohup


An alternative to forever on Linux is nohup.

To start a nohup instance

  1. cd to the location of app.js or wwwfolder
  2. run nohup nodejs app.js &

To kill the process

  1. run ps -ef|grep nodejs
  2. kill -9 <the process number>