Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/johnhof/koa-demo
A demo/sandbox for the koa framework
https://github.com/johnhof/koa-demo
Last synced: 20 days ago
JSON representation
A demo/sandbox for the koa framework
- Host: GitHub
- URL: https://github.com/johnhof/koa-demo
- Owner: johnhof
- License: mit
- Created: 2015-04-14T20:21:57.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2015-04-27T08:00:26.000Z (over 9 years ago)
- Last Synced: 2024-10-05T01:41:09.289Z (about 1 month ago)
- Language: JavaScript
- Size: 152 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# koa-demo
A demo/sandbox for the koa framework## To Run
ES6 is required for koa, so make sure a supporting version of node is installed
- `$ npm install -g n` (or any node version tool)
- `$ n 0.11.13` (at the time of writing)Run the server with the `--harmony` flag to allow ES6 functionality
- `$ node --harmony --use-strict app`
- OR `$ npm start` (requires `nodemon`)## Dev tools
If using sublime, install [JavaScriptNext - ES6 Syntax](https://packagecontrol.io/packages/JavaScriptNext%20-%20ES6%20Syntax) and set it as the default JS highlighter
## Routes
`/` - hello world
`/echo` - echo's the query param `say`
`/authenticated` - prints `YES` or `NO` depending on whether or not `_authenticated_` is in the query string