No description or website provided.
Pull request Compare This branch is 3 commits ahead, 500 commits behind heroku:master.
Latest commit 90e32ba Feb 1, 2012 Sam Breed fixing merge
Failed to load latest commit information.
support use cd instead of pushd Jan 20, 2012
vendor remember urls for vendoring Jan 13, 2012 oh, vim Jan 14, 2012

Heroku buildpack: Node.js

This is a Heroku buildpack for Node.js apps. It uses NPM and SCons.


Example usage:

$ ls
Procfile  package.json  web.js

$ heroku create --stack cedar --buildpack

$ git push heroku master
-----> Heroku receiving push
-----> Fetching custom buildpack
-----> Node.js app detected
-----> Vendoring node 0.4.7
-----> Installing dependencies with npm 1.0.8
       express@2.1.0 ./node_modules/express
       ├── mime@1.2.2
       ├── qs@0.3.1
       └── connect@1.6.2
       Dependencies installed

The buildpack will detect your app as Node.js if it has the file package.json in the root. It will use NPM to install your dependencies, and vendors a version of the Node.js runtime into your slug. The node_modules directory will be cached between builds to allow for faster NPM install time.

Node.js and npm versions

You can specify the versions of Node.js and npm your application requires using package.json

  "name": "myapp",
  "engines": {
    "node": ">=0.4.7 <0.7.0",
    "npm": ">=1.0.0"

To list the available versions of Node.js and npm, see these manifests:


To use this buildpack, fork it on Github. Push up changes to your fork, then create a test app with --buildpack <your-github-url> and push to it.

To change the vendored binaries for Node.js, NPM, and SCons, use the helper scripts in the support/ subdirectory. You'll need an S3-enabled AWS account and a bucket to store your binaries in.

For example, you can change the default version of Node.js to v0.6.7.

First you'll need to build a Heroku-compatible version of Node.js:

$ export AWS_ID=xxx AWS_SECRET=yyy S3_BUCKET=zzz
$ s3 create $S3_BUCKET
$ support/package_nodejs 0.6.7

Open bin/compile in your editor, and change the following lines:


Commit and push the changes to your buildpack to your Github fork, then push your sample app to Heroku to test. You should see:

-----> Vendoring node 0.6.7