应用程序的过渡状态
PM2 is a process manager. PM2 can start, stop, restart and delete processes.
Start a process:
$ pm2 start app.js --name "my-api"
$ pm2 start web.js --name "web-interface"
Now let's say I need to stop the web-interface:
$ pm2 stop web-interface
As you can see the process hasn't disappeared. It's still there but in stopped
status.
To restart it just do:
$ pm2 restart web-interface
Now I want to delete the app from the PM2 process list. To do so:
$ pm2 delete web-interface