My node app is deployed in /opt/hello/current but when I start PM2 (pm2 startOrReload ecosystem.json --env production) with the following ecosystem.json , it doesn't seems to take in account the given parameters...
"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"
}
}]
It should start the script (./hello.js) relatively from "cwd" (/opt/hello/current) ... am I wrong ?
It's currently starting with path /opt/hello/hello.js