Q:

Website stops working nodejs

I have website on Ubuntu sever. 
I have started process using this command 
sudo pm2 start app.js -i 0
it was working fine.Today morning my client message me it's stop working. 
I have stoped the node and re-start the process again using same command.
Now I want to know the reason by this happens?
How i can do this to check the issue ?
Thanks

A:

check pm2 logs folder ( PM2_PROCESS_USER_HOME_DIRECTORY/.pm2/logs)
May be server crash and you did't setup pm2 autostart
active pm2 autostart :

pm2 startup ubuntu 
pm2 save

