0.0.4 • Published 6 years ago
@mofe/aok v0.0.4
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>'
});