GithubHelp home page GithubHelp logo

mmuinos / nodejs-v4-buildpack Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jthomas/nodejs-v4-buildpack

0.0 0.0 0.0 13.26 MB

Cloud Foundry Node.js Buildpack with v4.0.0 support.

License: MIT License

Shell 88.54% JavaScript 3.51% Ruby 7.14% Makefile 0.81%

nodejs-v4-buildpack's Introduction

CloudFoundry build pack: Node.js

A Cloud Foundry buildpack for Node based apps.

This is based on the [Heroku buildpack] (https://github.com/heroku/heroku-buildpack-nodejs).

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.

cf push 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:

cd <your app dir>
npm install # vendors into /node_modules

cf push uploads your vendored dependencies.

Additional extensions

In cached mode, use the semver node_module (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 to add back this functionality.

Building

  1. Make sure you have fetched submodules
git submodule update --init
  1. Get latest buildpack dependencies
BUNDLE_GEMFILE=cf.Gemfile bundle
  1. Build the buildpack
BUNDLE_GEMFILE=cf.Gemfile bundle exec buildpack-packager [ cached | uncached ]
  1. Use in Cloud Foundry

Upload 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

Supported binary dependencies

The NodeJS buildpack only supports the two most recent stable patches for each dependency in the manifest.yml.

If you want to use previously supported dependency versions, provide the --use-custom-manifest=manifest-including-unsupported.yml option to buildpack-packager.

Options

Specify a node version

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

"engines": {
  "node": "0.11.x"
}
"engines": {
  "node": "0.10.33"
}

Contributing

Find our guidelines here.

Reporting Issues

Open an issue on this project

Active Development

The project backlog is on Pivotal Tracker

nodejs-v4-buildpack's People

Contributors

aeby avatar aramprice avatar btubbs avatar buddhistpirate avatar crawsible avatar ddollar avatar dzuelke avatar flavorjones avatar hone avatar hunterloftis avatar jacobwgillespie avatar jclem avatar jkutner avatar jordi-pivotal avatar jtarchie avatar kevinsuttle avatar kuba-kubula avatar lackac avatar mattgraham avatar mhoran avatar mlynch avatar mmcgrana avatar pmuellr avatar rwonly avatar ryanbrainard avatar rykov avatar squeedee avatar styeung avatar timshadel avatar zeke avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.