AWS: PM2
I use PM2 to let my Node.js running forever
Here are some commonds:
Install: npm install pm2 -g
Setup:
pm2 start app.js
pm2 save
pm2 startup
Check log: pm2 log
Kill: pm2 kill
Remove: npm remove pm2 -g
Today, I meet a mistake: status in the pm2 is “errored”
Spent a lot of time then figure out that my catch(error){} forgot to add “error”” parameter, my node.js didn’t find this error and compile successfully, but it can’t running on pm2