I have a node chat application that needs to keep running on my server (ubuntu with nginx). The problem is that the application stops after a few days without any error. When I check on the server I see that my pm2 list is empty.
The code I use to start my app:
cd myapppm2 start npm --name='backend' -- start
It somehow looks as if pm2 is reset after a while. But I'm trying to keep running it forever, but then I run into the same problem. Is there some way to prevent the pm2 list from getting empty?
I run the same cmd to start it and again its happening.I want to keep running the pm2 process in my server without stopping automatically.