Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ryanj/http-base
basic http server for nodejs with static files
https://github.com/ryanj/http-base
Last synced: 18 days ago
JSON representation
basic http server for nodejs with static files
- Host: GitHub
- URL: https://github.com/ryanj/http-base
- Owner: ryanj
- Created: 2015-04-07T05:06:39.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-11-14T19:15:56.000Z (almost 6 years ago)
- Last Synced: 2024-10-11T00:12:43.260Z (about 1 month ago)
- Language: JavaScript
- Homepage:
- Size: 30.3 KB
- Stars: 2
- Watchers: 3
- Forks: 51
- Open Issues: 36
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# http-base [![Build Status](http://img.shields.io/jenkins/s/https/build-shifter.rhcloud.com/http-build.svg)](https://build-shifter.rhcloud.com/job/http-build/) [![Dependency Check](http://img.shields.io/david/ryanj/http-base.svg)](https://david-dm.org/ryanj/http-base)
*A basic HTTP example repo for nodejs, inspired by Raynos/http-framework*# Local Development
Install dependencies:```bash
npm install
```Start a local server:
```bash
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](https://github.com/openshift/origin/releases/).
Use [vagrant](http://openshift.org/vm) or [ansible](https://github.com/openshift/openshift-ansible) to setup your own deployment of OpenShift, then use `oc login` to authenticate. These instructions assume that a basic [nodejs builder image](https://github.com/openshift/origin/tree/master/examples/image-streams) 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`](https://github.com/ryanj/http-base/blob/master/gulpfile.js) 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/)