@mofe/aok
v0.0.4
Published
reverse koa
Downloads
1
Readme
Aok
reverse koa
yarn add @mofe/aok
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>'
});