To start your node app with pm2, set the "start" command under "scripts" in package.json, or if you use a Procfile for heroku, the web
command to the following:
pm2-runtime start ecosystem.config.js
You should have a ecosystem.config.js file to configure pm2. For example: