The Next Generation Platform is Coming - Get Ready Now!
by AutoFi
GitHub Readme.md
This buildpack will install PM2 on Heroku.
The node buildpack should be added first.
heroku buildpacks:set https://github.com/heroku/heroku-buildpack-nodejs
Add pm2 buildpack at index 2:
heroku buildpacks:add --index 2 https://github.com/AutoFi/heroku-buildpack-pm2
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:
module.exports = {
apps: [
{
name: 'myApp',
script: './built/src/index.js',
max_memory_restart: `${process.env.MAX_OLD_SPACE_SIZE}M` || '1024M',
node_args: [
'--optimize-for-size',
],
},
],
};
Copy the snippet above into CLI.
We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.