Coder Social home page Coder Social logo

harchu / nodejs-custom-version-openshift Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ramr/nodejs-custom-version-openshift

0.0 1.0 0.0 27 KB

Node.js quickstart application to run the latest or any custom Node.js version on OpenShift

License: MIT License

Shell 51.69% HTML 24.24% JavaScript 24.07%

nodejs-custom-version-openshift's Introduction

Running a custom/latest Node[.js] version on Red Hat's OpenShift PaaS

This git repository is a sample Node application along with the "orchestration" bits to help you run the latest or a custom version of Node on Red Hat's OpenShift PaaS.

Selecting a Node version to install/use

To select the version of Node.js that you want to run, just edit or add a version to the .openshift/markers/NODEJS_VERSION file.

Example: To install Node.js version 4.2.3, you can run:
   $ echo 4.2.3 >> .openshift/markers/NODEJS_VERSION

Or alternatively, edit the ```.openshift/markers/NODEJS_VERSION``` file
in your favorite editor aka vi ;^)

The action_hooks in this application will use that NODEJS_VERSION marker file to download and extract that Node version if it is available on nodejs.org and will automatically set the paths up to use the node/npm binaries from that install directory.

 See: .openshift/action_hooks/ for more details.

Note: The last non-blank line in the .openshift/markers/NODEJS_VERSION
      file.determines the version it will install.

Okay, now onto how can you get a custom Node.js version running on OpenShift.

Steps to get a custom Node.js version running on OpenShift

Create an account at http://openshift.redhat.com/

Create a namespace, if you haven't already do so

rhc domain create <yournamespace>

Create a nodejs application (you can name it anything via -a)

rhc app create -a palinode  -t nodejs-0.10

Add this github nodejs-custom-version-openshift repository

cd palinode
git remote add upstream -m master git://github.com/ramr/nodejs-custom-version-openshift.git
git pull -s recursive -X theirs upstream master

Optionally, specify the custom version of Node.js you want to run with (Default is v4.2.3). If you want to more later version of Node (example v4.2.42), you can change to that by just writing it to the end of the NODEJS_VERSION file and committing that change.

echo 4.2.42 >> .openshift/markers/NODEJS_VERSION
#
# Or alternatively, edit the .openshift/markers/NODEJS_VERSION file
# in your favorite editor aka vi ;^)
#
# Note: 4.2.42 doesn't exist (as yet) and is a fictitious version
#       mentioned here solely for demonstrative purposes.
#
git commit . -m 'use Node version 4.2.42'

Then push the repo to OpenShift

git push

That's it, you can now checkout your application at:

http://palinode-$yournamespace.rhcloud.com
( See env @ http://palinode-$yournamespace.rhcloud.com/env )

nodejs-custom-version-openshift's People

Watchers

 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.