此方法需要用户手势。 否则,它返回false。
const koa2 = require(`koa2`);const Router = require(`koa-router`);const router = new Router();const app = new koa2();const Index = router.get(`/`, async (ctx, next) =>{ await next() ctx.status = 200; ctx.type= `html`; ctx.body = `hello2
`}).routes();app.use(Index);app.listen(1995);