-
import * as Router from 'koa-router';
const router = new Router();
router.all('*', HomeCtrl.index); // 报错
-
This return 'Not called' body
``` javascript
const app = new (require('koa'))();
const router = require('koa-router')();
app.use((ctx, next) => {
ctx.body = 'Not called';
return next();
});
ro…
-
**Description**
When using nested routers and other middleware, the Router.match can include layers without methods in the matched.pathAndMethod array. This can cause issues downstream when setting t…
-
- node: 6.9.2
- koa: 1.2.4
- koa-router: 5.4.0
```
const koa = require('koa');
const router = require('koa-router');
const app = koa();
const rootRouter = router();
const fooRouter = route…
-
Hi. I noticed an inconsistent behavior between mounting a router onto an app (`app.use(router.routes(), router.allowedMethods())`) and onto another router (`router.use('/base/path', subRouter.routes()…
-
#### Descriptions
The middleware used in a nested-router can be triggered if the regexp matches (matchedRoute) with the unrelated path. The behavior is something intuitive or not easily predictable…
-
One of the off-putting things about Koa vs other solutions is that it isn't clear which NPM packages are maintained by the Koa authors and which are community efforts. I would like to stick to officia…
-
If there is a middleware added after `router.allowedMethods()` that invokes `ctx.throw`, it prevents `allowedMethods` from responding to `OPTIONS` requests for legitimate URLs.
## Experiment 1
R…
-
### Description
`@koa/router` just released 13.0.0 and it's breaking our versioned tests. [changelog](https://github.com/koajs/router/releases/tag/v13.0.0)
### Acceptance Criteria
koa router ver…
-
I'm working with koa-mount, looks like the problem is `koa-session` but I'm completely lost with this implementation with `koa-passport`. My code is like :
`server.js`:
```js
'use strict';
cons…