如何使用PM2运行多个应用程序? [英] How to run multiple app using PM2?
问题描述
我想使用 PM2 运行我的angular4应用,它将运行,但是当我关闭终端时,它将停止.
I want to run my angular4 app using PM2 it will run but when I am close the terminal it will stop.
-
在此服务器上已经运行了一个应用程序,它运行正常, 但是在我的应用程序中,当我打开终端时它将正常运行,否则它将停止
On this server already run one application, it is working properly, but in my app it will work when I am open the terminal, otherwise it will stop
pm2启动server.js
pm2 start server.js
我正在使用此命令来运行我的应用程序,但是当我关闭终端时,它将立即停止, 所以我该如何使用PM2永久运行此应用程序.
I am using this command to run my app but when I am Close the Terminal immediately it will stop, so how can I run this app Forever using PM2.
推荐答案
一切都很好,只需在 ROOT
1)首先转到您的项目目录,然后从ROOT下运行.
1) first go to your Project Directory and run below from from ROOT.
pm2 start server.js
它将正常工作.
这篇关于如何使用PM2运行多个应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!