Referring to this: How Can I run PM2 with Angular-Cli? - Angular2
Is it possible to run pm2 configuration with angular-cli?
Something like this - pm2.json:
{
"apps": [{
"name": "my-app",
"script": "./usr/bin/ng serve",
"instances": "1",
"error_file" : "err.log",
"out_file" : "out.log",
"merge_logs" : true,
"log_date_format" : "YYYY-MM-DD HH:mm Z",
"env": {
"NODE_ENV": "development"
},
"env_production" : {
"NODE_ENV": "production"
}
}]
}
From command line this command works: pm2 start /usr/bin/ng -- serve --prod
but this doesn't: pm2 start pm2.json