I have a vm instance set up in Google Compute Engine. I installed pm2, ran these commands:
sudo env PATH=$PATH:/usr/local/bin pm2 startup -u zgintasz
pm2 start index.js
When I type pm2 list, I then see my app process running.
I wanted to make sure my nodejs app relaunches when server is restarted, so I clicked Reset on Google Developer Console, typed in pm2 list again and I don't see it running anymore. What can be wrong?
I have been in the same boat. After some searching I found that you need to 'save' after starting apps. 'pm2 save' - which dumps the processes.
This solved this issue for me personally, on my Ubuntu machine, but on my debian vps, it seems to still not persist as it should.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With