【发布时间】:2017-09-28 21:28:06
【问题描述】:
我正在使用 npm start 运行我的 Web 应用程序,但现在我需要将其部署到 Digital Ocean,这意味着我必须使用 forever 来启动我的应用程序,但我无法弄清楚...
我尝试以forever npm start 运行它,但它返回:
错误:无法永远启动
错误:脚本 /root/saleseng/OP Apps Platform/server/npm 不存在。
这是来自package.json 的我的scrips 对象:
"scripts": {
"start": "nodemon --watch src --exec babel-node -- src/index.js",
"test": "echo \"Error: no test specified\" && exit 1"
}
【问题讨论】:
-
试试这个 "forever start -c "npm start" /path/to/app/dir/"