heroku-buildpack-pm2

by ItsJimi

GitHub Readme.md

PM2 Buildpack

This buildpack install pm2, gc-stats and event-loop-inspector.

Install

Add nodejs buildpack:

heroku buildpacks:set https://github.com/heroku/heroku-buildpack-nodejs

Add pm2 buildpack at index 2:

heroku buildpacks:add --index 2 https://github.com/ItsJimi/heroku-buildpack-pm2

To start your node app with pm2, go to your package.json:

"scripts": {
  "start": "pm2 start index.js --deep-monitoring --attach"
}

To monitor your application with pm2, got to your PM2 Dashboard, get public key and secret key. After, you can go to heroku apps settings, Reveal Config Vars button and add:

KEYMETRICS_PUBLIC

and

KEYMETRICS_SECRET