Buildpacks allow for various configuration options (through
BP_NODE_* variables in
project.toml or via the environment), we try to auto-detect what’s best so here is a summary.
When does it run? #
We auto-configure when we find a
npm run start in your
package.json file. Otherwise, the assumption is that NodeJS is part of another language (e.g. Ruby, PHP, …) and used for the asset pipeline or similar. If you intend to run a NodeJS service, you will need to add something like this to your
Auto-detected settings #
BP_NODE_RUN_SCRIPTS will be set if we find a
npm run build task in your
BP_KEEP_FILES is set to
When you set your own values, these values are always respected and we will stop adding them.