open-index/open-npm huggingface dataset:
npm package: @mofe/aok
Description: reverse koa
Author: MofeLee
Latest version: 0.0.4

# Aok

reverse koa

```bash
yarn add @mofe/aok
```


```javascript
const {
  Aok,
  AokRouter
} = require('@mofe/aok');

const aok = Aok();
const aokRouter = AokRouter('baidu.com');

aokRouter.get('/abc/:id', async (ctx)=>{
  console.log(ctx)
});

aok.use(aokRouter.routes())

const dispatch = aok.callback();

dispatch({
  url: 'http://www.baidu.com/abc/111',
  body: '<html></html>'
});
```