Created | Updated | Maintainer |
---|---|---|
2024-08-07 10:21:09 +0530 |
2024-08-07 12:09:05 +0530 |
Ibrar Ansari |
Make PM2 automatically start on Windows startup
npm install pm2 -g
npm install pm2-windows-startup -g
pm2-startup install
pm2-startup enable
pm2 start app.js --name "my-app1"
or
pm2 start npm --name "my-app" -- run dev
or
pm2 start "npm run dev" --name my-app
PM2 will now automatically revive the saved processes on startup. To save the current list of processes execute:
pm2 startup
pm2 save
pm2 list
pm2 logs <JOB_ID/JOB_Name>
Click on this link to see PM2-Cheat-Sheet for more details....