Changed to cca-koa-router

This commit is contained in:
nicco 2017-08-21 00:23:57 +02:00
parent e70398f9c1
commit cc06fc22fd
2 changed files with 6 additions and 6 deletions

View File

@ -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
})
}))

View File

@ -1,6 +1,6 @@
{
"name": "cca-koa-parser",
"version": "0.1.0",
"version": "0.1.1",
"description": "Koa Body Parser",
"main": "Parser.js",
"repository": {