【发布时间】:2016-11-29 23:11:48
【问题描述】:
我的节点应用部署在 /opt/hello/current 但是当我使用以下生态系统.json 启动 PM2(pm2 startOrReload 生态系统.json --env 生产)时,它似乎没有考虑给定的参数......
"apps" : [
{
"name": "hello",
"cwd": "/opt/hello/current", // the directory from which your app will be launched
"script": "./hello.js", // script path relative to pm2 start
"args": "",
"watch": false,
"node_args": "",
"merge_logs": true,
"env" : {
"NODE_ENV": "development"
},
"env_staging" : {
"NODE_ENV": "staging"
},
"env_production" : {
"NODE_ENV": "production"
}
}]
它应该从“cwd”(/opt/hello/current)相对地启动脚本(./hello.js)......我错了吗?
目前以路径 /opt/hello/hello.js 开头
【问题讨论】: