How to use pm2 to keep a node app running
Install pm2
npm install pm2 -g
Start your node app
pm2 start npm -- start
See node logs
pm2 logs
list running node apps
pm2 list
kill a node app
pm2 kill
clear pm2 logs
pm2 flush
Install pm2
npm install pm2 -g
Start your node app
pm2 start npm -- start
See node logs
pm2 logs
list running node apps
pm2 list
kill a node app
pm2 kill
clear pm2 logs
pm2 flush