Use pm2 management web application

Use pm2 management web application

Open a command window global installed pm2

npm i pm2 -g

Here Insert Picture Description
cd package to create a good web file management using the Node ( the Node to quickly create a web server )
Here Insert Picture Description
running

pm2 start .\app.js --name my_vue

Here Insert Picture Description
Then there are some commonly used commands and docker almost like

# 展示应用列表
pm2 list
# 停止指定应用
# 使用name替换id也可以
pm2 stop [id]
# 重启指定应用
pm2 restart [id]
#删除指定应用
pm2 delete [id]

Use pm2 web projects can run in the background

Published 70 original articles · won praise 6 · views 4078

Guess you like

Origin blog.csdn.net/weixin_43424932/article/details/105136179