https://github.com/tpiros/starwars-koa
https://github.com/tpiros/starwars-koa
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/tpiros/starwars-koa
- Owner: tpiros
- Created: 2014-01-04T00:19:00.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2014-01-04T00:34:41.000Z (over 11 years ago)
- Last Synced: 2025-03-12T12:51:39.868Z (3 months ago)
- Language: JavaScript
- Size: 121 KB
- Stars: 12
- Watchers: 2
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Example REST service using Koa
Only works with Node.js version higher than 0.11.3 (see blog post linked below to see how to setup multiple node versions)
To install:
npm install
To start the app a special flag is required:
node --harmony-generators ./app.js
The book collection used in the example is available in the
sw.json
file. The code assumes that the database name is starwars and the collection is books - henceforth to import the JSON file execute the following (alter if necessary):
mongoimport --db starwars --collection books --file sw.json
For futher information check: http://tamas.io/replacing-express-with-koa/