A simple extension to run HarpJS on OpenShift.
Execute npm install harp-openshift --save
in your project folder.
The following line creates a new scalable NodeJS application named harptest in the namespace example.
rhc create-app harptest nodejs-0.10 -s -n example
git clone ssh://<user-id>@harptest-example.openshift.local/~/git/harptest.git/ harptest
cd harptest
rm deplist.txt index.html
Add the packages harp and harp-openshift dependencies to the package.json, remove existing entries if any
{
"dependencies": {
"harp":"~0.14.x",
"harp-openshift":"~0.0.7"
}
}
Next initialize the HarpJS application into the subdirectory _harp
harp init _harp
Now delete all contents in server.js and insert the following line.
require('harp-openshift').openshift('_harp');
git add _harp
git commit -a -m "Harptest running"
git push
Open your browser and navigate to https://harptest-example.openshift.local
Copyright (c) 2014 Marco Grätsch
Licensed under the MIT license.