step:1 PM2-configuration:
1.npm install -g pm2
2.pm2 list
3.pm2 status
4.pm2 start dist/main.js --name appname
5.pm2 save
6.pm2 monit
7.pm2 logs
8.pm2 kill
step-2 If u want the the saved app:
9.pm2 resurrect
step-3 ecosystem-file configuration:
10.pm2 start ecosystem.config.js