Skip to content

Latest commit

 

History

History
75 lines (50 loc) · 6.17 KB

File metadata and controls

75 lines (50 loc) · 6.17 KB

Heroku Node.js Engine Cloud Native Buildpack

Heroku's official Cloud Native Buildpack for Node.js.

CI

Registry

This buildpack is designed to work in conjunction with other buildpacks like heroku/nodejs-npm or heroku/nodejs-yarn, or independently with simple Node.js with vendored or no dependencies. This buildpack is part of the heroku/nodejs meta-buildpack, which is the default and recommended Cloud Native Buildpack for Node.js apps.

What it does

This buildpack installs the Node.js distribution based on the engines.node property of an app's package.json. The distribution of Node.js includes node, npm, npx, and corepack. All of these commands will be available on $PATH. The versions of npm, npx, and corepack installed by this buildpack will be the same that were packaged with Node.js.

To install a different version of npm and/or npx, or to install node_modules with npm install, additionally use the heroku/nodejs-npm buildpack. Alternatively, use the heroku/nodejs meta-buildpack, which includes both buildpacks.

To install yarn and/or install node_modules with yarn, additionally use the heroku/nodejs-yarn buildpack. Alternatively, use the heroku/nodejs meta-buildpack, which includes both buildpacks.

Reference

Detect

This buildpack's bin/detect always passes. However, the overall group detection may fail based on provides and requires.

Build Plan

This buildpack provides node. If a package.json, index.js, and/or server.js is detected, this buildpack will also set node as a requires entry.

Environment Variables

PATH

$PATH will be modified such that node, npm, npx, and corepack are available.

WEB_MEMORY

$WEB_MEMORY will be set to a reasonable default at runtime. This value is used to determine the correct $WEB_CONCURRENCY.

WEB_CONCURRENCY

$WEB_CONCURRENCY will be set to a reasonable default at runtime. This variable may be used in the application to set the number of workers for apps that use them.

Usage

To build an app locally into an OCI Image with this buildpack, use the pack command from Cloud Native Buildpacks:

pack build example-app-image --buildpack heroku/nodejs-engine --path /some/example-app

Additional Info

For development, dependencies, contribution, license and other info, please refer to the root README.md.