All Projects → heroku → Heroku Buildpack Nodejs

heroku / Heroku Buildpack Nodejs

Licence: mit
The official Heroku buildpack for Node.js apps.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Heroku Buildpack Nodejs

Heroku Buildpack Phoenix Static
A Heroku buildpack for building Phoenix's static assets
Stars: ✭ 225 (-80.37%)
Mutual labels:  heroku-buildpack
heroku-buildpack-nim
Deploy nim applications to heroku.
Stars: ✭ 20 (-98.25%)
Mutual labels:  heroku-buildpack
Heroku Buildpack Python
The official Heroku buildpack for Python apps.
Stars: ✭ 849 (-25.92%)
Mutual labels:  heroku-buildpack
heroku-binary-buildpack
Heroku buildpack to execute binaries.
Stars: ✭ 29 (-97.47%)
Mutual labels:  heroku-buildpack
heroku-buildpack-tex
A Heroku buildpack to run TeX Live inside a dyno.
Stars: ✭ 18 (-98.43%)
Mutual labels:  heroku-buildpack
Heroku Buildpack R
Heroku buildpack for R - Makes deploying R on Heroku easy
Stars: ✭ 258 (-77.49%)
Mutual labels:  heroku-buildpack
Subdir Heroku Buildpack
Allows to use subdirectory configured via environment variable as a project root
Stars: ✭ 211 (-81.59%)
Mutual labels:  heroku-buildpack
Heroku Buildpack Elm
Heroku buildpack for deploying Elm apps (NEEDS MAINTAINER)
Stars: ✭ 39 (-96.6%)
Mutual labels:  heroku-buildpack
heroku-buildpack-deno
Heroku Buildpack for Deno
Stars: ✭ 72 (-93.72%)
Mutual labels:  heroku-buildpack
Heroku Buildpack Elixir
Heroku Buildpack for Elixir with nitro boost
Stars: ✭ 759 (-33.77%)
Mutual labels:  heroku-buildpack
heroku-buildpack-d
Heroku Buildpack for the D Programming Language
Stars: ✭ 13 (-98.87%)
Mutual labels:  heroku-buildpack
buildpack-stdlib
[DEPRECATED] A standard library for Heroku buildpacks written in bash.
Stars: ✭ 19 (-98.34%)
Mutual labels:  heroku-buildpack
Create React App Buildpack
⚛️ Heroku Buildpack for create-react-app: static hosting for React.js web apps
Stars: ✭ 3,161 (+175.83%)
Mutual labels:  heroku-buildpack
heroku-buildpack-graphviz
Install Graphviz on Heroku
Stars: ✭ 18 (-98.43%)
Mutual labels:  heroku-buildpack
Slugrunner
Buildpack application runner for Deis Workflow.
Stars: ✭ 14 (-98.78%)
Mutual labels:  heroku-buildpack
Heroku Buildpack Google Chrome
Run (headless) Google Chrome on Heroku
Stars: ✭ 215 (-81.24%)
Mutual labels:  heroku-buildpack
heroku-buildpack-cli
No description or website provided.
Stars: ✭ 38 (-96.68%)
Mutual labels:  heroku-buildpack
Heroku Buildpack Datadog
Heroku Buildpack to run Datadog DogStatsD in a Dyno
Stars: ✭ 55 (-95.2%)
Mutual labels:  heroku-buildpack
Heroku Buildpack Jvm Common
Official Heroku buildpack for OpenJDK. It only installs the JDK and does not build an application. It is used by the Java, Scala, and Clojure buildpacks.
Stars: ✭ 34 (-97.03%)
Mutual labels:  heroku-buildpack
Dotnetcore Buildpack
Heroku .NET Core Buildpack
Stars: ✭ 416 (-63.7%)
Mutual labels:  heroku-buildpack

Heroku Buildpack for Node.js

nodejs

This is the official Heroku buildpack for Node.js apps.

CircleCI

Documentation

For more information about using this Node.js buildpack on Heroku, see these Dev Center articles:

For more general information about buildpacks on Heroku:

Using the Heroku Node.js buildpack

It's suggested that you use the latest version of the release buildpack. You can set it using the heroku-cli.

heroku buildpacks:set heroku/nodejs

Your builds will always used the latest published release of the buildpack.

If you need to use the git url, you can use the latest tag to make sure you always have the latest release. The main branch will always have the latest buildpack updates, but it does not correspond with a numbered release.

heroku buildpacks:set https://github.com/heroku/heroku-buildpack-nodejs#latest -a my-app

Locking to a buildpack version

Even though it's suggested to use the latest release, you may want to lock dependencies - including buildpacks - to a specific version.

First, find the version you want from the list of buildpack versions. Then, specify that version with buildpacks:set:

heroku buildpacks:set https://github.com/heroku/heroku-buildpack-nodejs#v176 -a my-app

Chain Node with multiple buildpacks

This buildpack automatically exports node, npm, and any node_modules binaries into the $PATH for easy use in subsequent buildpacks.

Feedback

Having trouble? Dig it? Feature request?

Development

Prerequisites

For local development, you may need the following tools:

Deploying an app with a fork or branch

To make changes to this buildpack, fork it on GitHub. Push up changes to your fork, then create a new Heroku app to test it, or configure an existing app to use your buildpack:

# Create a new Heroku app that uses your buildpack
heroku create --buildpack <your-github-url>

# Configure an existing Heroku app to use your buildpack
heroku buildpacks:set <your-github-url>

# You can also use a git branch!
heroku buildpacks:set <your-github-url>#your-branch

Downloading Plugins

In order to download the latest plugins that have been released, run the following:

plugin/download.sh v$VERSION

Make sure the version is in the format v#, ie. v7.

Tests

The buildpack tests use Docker to simulate Heroku's stacks.

To run the test suite:

make test

Or to just test a specific stack:

make heroku-16
make heroku-18
make heroku-20

The tests are run via the vendored shunit2 test framework.

Debugging

To display the logged build outputs to assist with debugging, use the "echo" and "cat" commands. For example:

test() {
  local log_file var

  var="testtest"
  log_file=$(mktemp)
  echo "this is the log file" > "$log_file"
  echo "test log file" >> "$log_file"

  # use `echo` and `cat` for printing variables and reading files respectively
  echo $var
  cat $log_file

  # some cases when debugging is necessary
  assertEquals "$var" "testtest"
  assertFileContains "test log file" "$log_file"
}

Running the test above would produce:

testtest
this is the log file
test log file

The test output writes to $STD_OUT, so you can use cat $STD_OUT to read output.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].