https://github.com/Unitech/PM2 Online deployment, using pm2 can automatically daemonize the process.
PM2 is a production process manager for Node.js applications with a built-in load balancer. It allows you to keep applications alive forever, to reload them without downtime and to facilitate common system admin tasks.
Go check the nohup command.
Use
&
orctrl+c
to transfer the task to the background for execution.https://github.com/Unitech/PM2
Online deployment, using pm2 can automatically daemonize the process.
PM2 is a production process manager for Node.js applications with a built-in load balancer. It allows you to keep applications alive forever, to reload them without downtime and to facilitate common system admin tasks.
Screen is a powerful tool
I wrote a simple sh script and put the npm start command into it. Then nohup /root/test.sh & worked
forever