Docs fixes

This commit is contained in:
nicco 2017-08-21 00:24:07 +02:00
parent 5638465101
commit 0eb643f5da
2 changed files with 10 additions and 10 deletions

View File

@ -9,12 +9,12 @@ const
const const
app = new Koa(), app = new Koa(),
port = 3001 port = 3000
app.use(router(_ => { app.use(router(_ => {
_.get('/user/:user/', (c, n) => { _.get('/user/:user', (c, n) => {
c.body = c.request.param['user'] c.body = c.request.params['user']
// GET /user/foo/ => 'foo' // GET /user/foo => 'foo'
}) })
})) }))

View File

@ -1,6 +1,6 @@
{ {
"name": "cca-koa-router", "name": "cca-koa-router",
"version": "0.1.1", "version": "0.1.2",
"description": "Koa Router", "description": "Koa Router",
"main": "Router.js", "main": "Router.js",
"repository": { "repository": {