pivotal-cf/nodejs-buildpack

Name: nodejs-buildpack

Owner: Pivotal Cloud Foundry

Description: Cloud Foundry buildpack for Node.js

Created: 2015-12-03 00:50:17.0

Updated: 2017-03-13 22:43:27.0

Pushed: 2015-12-03 00:57:12.0

Homepage: http://docs.cloudfoundry.org/buildpacks/

Size: 13298

Language: Shell

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

CloudFoundry build pack: Node.js

A Cloud Foundry buildpack for Node based apps.

This is based on the Heroku buildpack.

Additional documentation can be found at the CloudFoundry.org.

Usage

This buildpack will get used if you have a package.json file in your project's root directory.

ush my_app -b https://github.com/cloudfoundry/buildpack-nodejs.git
Disconnected environments

To use this buildpack on Cloud Foundry, where the Cloud Foundry instance limits some or all internet activity, please read the Disconnected Environments documentation.

Vendoring app dependencies

As stated in the Disconnected Environments documentation, your application must 'vendor' it's dependencies.

For the NodeJS buildpack, use `npm`:

your app dir>
install # vendors into /node_modules
f push``` uploads your vendored dependencies.

Additional extensions
ached mode, [use the semver node_module](bin/compile#L30-32) (as opposed to http://semver.io) to resolve the correct node version. The semver.io service has an additional preference for stable versions not present in the node module version. We wrap the node module using [lib/version_resolver.js](lib/version_resolver.js) to add back this functionality.

uilding
ake sure you have fetched submodules

git submodule update –init

et latest buildpack dependencies

BUNDLE_GEMFILE=cf.Gemfile bundle

uild the buildpack

BUNDLE_GEMFILE=cf.Gemfile bundle exec buildpack-packager [ –cached | –uncached ]

se in Cloud Foundry

load the buildpack to your Cloud Foundry and optionally specify it by name

cf create-buildpack custom_node_buildpack node_buildpack-offline-custom.zip 1 cf push my_app -b custom_node_buildpack

upported binary dependencies

buildpack only supports the stable patches for each dependency listed in the [manifest.yml](manifest.yml) and [releases page](https://github.com/cloudfoundry/nodejs-buildpack/releases).


ou try to use a binary that is not currently supported, staging your app will fail and you will see the following error message:
   Could not get translated url, exited with: DEPENDENCY_MISSING_IN_MANIFEST: ...

! ! exit ! Staging failed: Buildpack compilation step failed

esting
dpacks use the [Machete](https://github.com/cloudfoundry/machete) framework for running integration tests.

est a buildpack, run the following command from the buildpack's directory:

BUNDLE_GEMFILE=cf.Gemfile bundle exec buildpack-build

 options can be found on Machete's [Github page.](https://github.com/cloudfoundry/machete)


ptions

Specify a node version

engines.node in package.json to the semver range
specific version) of node you'd like to use.
s a good idea to make this the same version you use during development)

“engines”: { “node”: “0.11.x” }

“engines”: { “node”: “0.10.33” }

ontributing

 our guidelines [here](./CONTRIBUTING.md).

eporting Issues

 an issue on this project

ctive Development

project backlog is on [Pivotal Tracker](https://www.pivotaltracker.com/projects/1042066)

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.