【发布时间】:2016-03-08 22:17:42
【问题描述】:
我已经使用 pm2 在 heroku 上部署了一个节点应用程序。由于我们没有控制台来部署 pm2 提供了使用另一个文件 [main.js] 作为启动脚本抽象的官方方式
http://pm2.keymetrics.io/docs/usage/use-pm2-with-cloud-providers/#heroku-google-app-engine-azure
问题是 pmx 语句[如下所示] 应该去哪里;在上面链接中提到的节点项目 app.js 或 pm2 抽象 main.js 上?
var pmx = require('pmx').init({
http : true, // HTTP routes logging (default: true)
ignore_routes : [/socket\.io/, /notFound/], // Ignore http routes with this pattern (Default: [])
errors : true, // Exceptions loggin (default: true)
custom_probes : true, // Auto expose JS Loop Latency and HTTP req/s as custom metrics
network : true, // Network monitoring at the application level
ports : true // Shows which ports your app is listening on (default: false)
});
【问题讨论】: