Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable network applications. This custom Node.js cartridge takes care of auto-updating the Node.js and NPM versions on each build.

Customizing the Node.js and npm versions

Node.js

A different URL can be specified either via NODE_VERSION_URL environment variable or by setting .openshift/NODE_VERSION_URL marker in your application repository. For instance, you'd get the latest 0.10.x (0.10.41 as of Jan 24, 2015) by putting this in NODE_VERSION_URL variable or .openshift/NODE_VERSION_URL marker:

https://semver.io/node/resolve/0.10

If you're using a non-default Node.js version and you're planning to scale the application across multiple gears, you must use the environment variable (learn here why).

npm

By default, the npm version is determined by running npm view npm version.

A different npm version can be specified either via NPM_VERSION_URL environment variable or by setting .openshift/NPM_VERSION_URL marker in your application repository. For instance, you'd get the latest 2.x (2.14.16 as of Jan 24, 2016) by putting this in NPM_VERSION_URL variable or .openshift/NPM_VERSION_URL marker: