pm2是否可以运行"npm start"脚本 [英] Can pm2 run an 'npm start' script
本文介绍了pm2是否可以运行"npm start"脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
pm2是否有运行npm启动脚本的方式,还是只需要运行pm2 start app.js
Is there a way for pm2 to run an npm start script or do you just have to run pm2 start app.js
所以在开发中
npm start
然后在pm2的生产环境中运行类似
Then in production with pm2 you would run something like
pm2 start 'npm start'
有一种等效的方法可以永远做到这一点
There is an equivalent way to do this in forever
forever start -c "npm start" ./
推荐答案
PM2现在支持npm start:
PM2 now supports npm start:
pm2 start npm -- start
这篇关于pm2是否可以运行"npm start"脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文