PM2 is a production process manager for Node.js that keeps your apps running.
Install
npm install -g pm2Start Your App
pm2 start app.js --name myappCommon Commands
pm2 list # List all processes\npm2 stop myapp # Stop app\npm2 restart myapp # Restart app\npm2 delete myapp # Remove app\npm2 logs myapp # View logs\npm2 monit # Real-time monitorStartup on Boot
pm2 startup\npm2 saveCluster Mode
pm2 start app.js -i max # Use all CPU cores