https://github.com/ryanj/micro-base
an example repo based on zeit/micro
https://github.com/ryanj/micro-base
Last synced: 5 months ago
JSON representation
an example repo based on zeit/micro
- Host: GitHub
- URL: https://github.com/ryanj/micro-base
- Owner: ryanj
- Created: 2018-01-08T06:27:34.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-15T19:44:13.000Z (over 8 years ago)
- Last Synced: 2025-04-06T20:15:16.541Z (about 1 year ago)
- Language: HTML
- Size: 68.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# micro-base
*An example project built using the zeit/micro framework*
[](https://david-dm.org/ryanj/micro-base)
## Local Dev
Clone the repo for a local development environment, then install dependencies and launch with:
```bash
npm install
npm run dev
```
## Developing with OpenShift
Use NodeJS v8.5.0 or higher when running this code:
```bash
oc new-app -e NPM_RUN=dev ryanj/nodejs-demo:8~https://github.com/ryanj/micro-base
```
Expose a route to your app, allowing external web traffic:
```bash
oc expose svc/micro-base && xdg-open http://$(oc get route micro-base | grep -v NAME | awk '{print $2}')
```
Connect to a pod using a live terminal in the OpenShift dashboard, or continuously sync code from a local clone of this repo into your remotely-running container:
```bash
oc rsync -w --exclude='.git*,node_modules*' $(pwd)/ $(oc get pods | grep -v NAME | grep -v build | cut -f1 -d' '):/opt/app-root/src/
```
Then, try editing `index.html` or even `index.js` to see your changes as you work.
## License: MIT