参考: How Can I run PM2 with Angular-Cli? - Angular2
是否可以使用angular-cli运行pm2配置?
像这样的东西 - 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"
}
}]
}
从命令行开始,此命令有效: pm2 start / usr / bin / ng - serve --prod
但这不是: pm2 start pm2.json