gpt4 book ai didi

parse-platform - 使用 pm2 启动解析仪表板

转载 作者:行者123 更新时间:2023-12-01 00:42:54 26 4
gpt4 key购买 nike

如何使用 pm2 永久运行 parse-dashboard?我尝试了以下方法:

仪表盘.json

{
"apps" : [{
"name" : "parse-dash”,
"script" : "/usr/local/bin/parse-dashboard”,
"watch" : true,
"merge_logs" : true,
"cwd" : "/home/parse",
"args" : "--config dashboard-config.json"
}]
}

并开始pm2:
pm2 start dashboard.json

但我收到以下错误:
evalmachine.<anonymous>:3
"name" : "parse-dash”,
^^^^^^^^^^^^^^^^^^

SyntaxError: Unexpected token ILLEGAL
at Object.exports.runInThisContext (vm.js:53:16)
at Object.module.exports.parseConfig (/usr/local/lib/node_modules/pm2/lib/Utility.js:145:17)
at Object.CLI._startJson (/usr/local/lib/node_modules/pm2/lib/CLI.js:302:23)
at Object.CLI.start (/usr/local/lib/node_modules/pm2/lib/CLI.js:98:9)
at /usr/local/lib/node_modules/pm2/bin/pm2:249:13
at /usr/local/lib/node_modules/pm2/node_modules/async/lib/async.js:181:20
at replenish (/usr/local/lib/node_modules/pm2/node_modules/async/lib/async.js:319:21)
at /usr/local/lib/node_modules/pm2/node_modules/async/lib/async.js:330:15
at Object.async.forEachLimit.async.eachLimit (/usr/local/lib/node_modules/pm2/node_modules/async/lib/async.js:220:35)
at Command.<anonymous> (/usr/local/lib/node_modules/pm2/bin/pm2:248:13)

我不熟悉 node_modules,我不确定我是否指向正确的文件夹。

最佳答案

嗨,伙计,你救了我的命,我也在寻找解决方案。
您的代码中的问题是在这些行上分隔的最后一个逗号:

"name"        : "parse-dash”,
"script" : "/usr/local/bin/parse-dashboard”,

改成 :
"name"        : "parse-dash",
"script" : "/usr/local/bin/parse-dashboard",

希望能帮助到你。

关于parse-platform - 使用 pm2 启动解析仪表板,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36239716/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com