PM2 server status showing online when server is down?

Solution for PM2 server status showing online when server is down?
is Given Below:

I have PM2 setup with a node server on EC2. The problem is that the server will go down but PM2 will show it’s still online so the server doesn’t restart. I have to manually restart PM2 to get the server working again.

I’m not sure if its because I set up PM2 incorrectly but I started the server with the command:

pm2 start npm --name "server" -- start