Skip to content

guillermodep/http-base

Repository files navigation

http-base Build Status Dependency Check

A basic HTTP example repo for nodejs, inspired by Raynos/http-framework

Launch on OpenShift

To deploy a clone of this application using the rhc command line tool:

rhc app create httpbase nodejs-0.10 --from-code=https://github.com/ryanj/http-base.git

Or link to a web-based clone+deploy on OpenShift Online or on your own OpenShift cloud:

https://openshift.redhat.com/app/console/application_type/custom?cartridges%5B%5D=nodejs-0.10&initial_git_url=https%3A%2F%2Fgithub.com%2Fryanj%2Fhttp-base.git

Local Development

Install dependencies:

npm install

Start a local server:

npm start

OpenShift V3 / Kubernetes

You'll need the oc command line tool to install this project in a Docker-based OpenShift environment. The cli tool binary is available via the openshift/origin releases page.

Use vagrant or ansible to setup your own deployment of OpenShift, then use oc login to authenticate. These instructions assume that a basic nodejs builder image has already been made available in the openshift project by an admin.

Build and deploy the application from the command line using the oc command line tool, and a nodejs builder image:

oc new-app openshift/nodejs~https://github.com/ryanj/http-base

After your deployment has completed, find the pod NAME for your hosted container:

oc get pods

Push changes from a local repo into this environment using the pod NAME from the previous step, allowing you to test your changes without stopping to make a commit:

oc rsync --exclude='node_modules*' . YOUR_PODNAME:

Use gulp to automatically publish updates your remotely-hosted container as you work:

PODNAME=YOUR_PODNAME gulp

The included gulpfile example will automatically distribute changes from your local index.html file into the identified pod.

License

This code is dedicated to the public domain to the maximum extent permitted by applicable law, pursuant to CC0 (http://creativecommons.org/publicdomain/zero/1.0/)

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •