Coder Social home page Coder Social logo

openshift-node-diy's Introduction

Openshift Node DIY

Usage

rhc create-app <app name> http://tinyurl.com/OpenShiftNodeDIY

What this cartridge provides out of the box

  1. node.js (latest stable currently 0.10.35)
  2. npm (latest stable currently 1.4.28)
  3. grunt
  4. bower

What this cartridge does out of the box

Not much.

  1. Installs node.js (version specified by $OPENSHIFT_NODEJS_VERSION and resolved by semver.io)
  2. Installs grunt, bower, and forever globally (specified by $OPENSHIFT_NPM_GLOBALS)
  3. Allows the user to manually install required dependencies (in a build action_hook)
  4. Runs npm start if package.json is found in repo directory (log is written to $OPENSHIFT_NODEJS_LOG_DIR)

How can I modify the cartridge

Use a different version of node
(using 0.11.13 as an example)
  1. Run rhc env set OPENSHIFT_NODEJS_CUSTOM_VERSION="0.11.13" -a <app name>
  2. Run rhc cartridge reload http://tinyurl.com/OpenShiftNodeDIY -a <app name>

Heads up! The cartridge defaults to installing grunt, bower, and forever globally. Bower depends on node >=0.10.0. If you wish to use an older version of node set $OPENSHIFT_NPM_CUSTOM_GLOBALS to not include bower.

Install more npm packages globally
(using gulp and component as an example)
  1. Run rhc env set OPENSHIFT_NPM_CUSTOM_GLOBALS="gulp component" -a <app name>
  2. Run rhc cartridge reload http://tinyurl.com/OpenShiftNodeDIY -a <app name>

Thanks!

These repos helped out a ton while developing this cartridge.

  1. engineersamuel/openshift-origin-cartridge-nodejs
  2. wshearn/openshift-origin-cartridge-nodejs
  3. ramr/nodejs-custom-version-openshift
  4. heroku/heroku-buildpack-nodejs

openshift-node-diy's People

Contributors

connyay avatar

Stargazers

Petr Bespechnyi avatar  avatar Satyam Yadav avatar Jingjing avatar Alejandro Vidal Castillo avatar Ian Soper avatar

Watchers

 avatar James Cloos avatar Jingjing avatar Ammon Victor avatar  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.