我有一个简单的命令,运行时运行良好:
parse-dashboard --config /home/ubuntu/dash/config.json但是,在使用pm2运行它时,它不起作用:
pm2 start parse-dashboard -- --config=/home/ubuntu/dash/config.json查看日志,我得到了错误:node: bad option: --config=/home/ubuntu/dash/config.json
我做错了什么?
发布于 2017-09-28 22:44:53
在指定参数的地方使用流程文件。创建以下文件并将其命名为ecosystem.json (确保“脚本”和“cwd”(应用程序将在其中启动)的位置对您来说是正确的)
{
"apps" : [{
"name" : "parse-dashboard-wrapper",
"script" : "/usr/bin/parse-dashboard",
"watch" : true,
"cwd" : "/home/parse/parse-dashboard",
"args" : "--config /home/ubuntu/dash/config.json"
}]
}然后用
pm2 start ecosystem.json
https://stackoverflow.com/questions/46478448
复制相似问题