diff --git a/README.md b/README.md index 25afd13..1b7d62f 100644 --- a/README.md +++ b/README.md @@ -9,18 +9,18 @@ Koa-Middleware for parsing body parameters in the request. Lightweight and no de ```javascript const Koa = require('koa'), - router = require('koa-simple-router'), - parser = require('cca-koa-parser') + parser = require('cca-koa-parser'), + router = require('cca-koa-router') const app = new Koa(), - port = 3001 + port = 3000 app.use(parser) -app.use(router({}, _ => { +app.use(router(_ => { _.post('/', (c, n) => { - c.body = [200, c.request.body] + c.body = c.request.body }) })) diff --git a/package.json b/package.json index f7b7993..3d3f591 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cca-koa-parser", - "version": "0.1.0", + "version": "0.1.1", "description": "Koa Body Parser", "main": "Parser.js", "repository": {