停止路由

This commit is contained in:
2020-02-24 12:45:01 +08:00
parent 1cf1123d15
commit 69b2dc7034

18
app.js
View File

@@ -46,15 +46,15 @@ app.use(async (ctx, next) => {
await next(); await next();
}) })
app.use(async (ctx,next)=>{ // app.use(async (ctx,next)=>{
// await next(); // // await next();
console.log(ctx.url) // // console.log(ctx.url)
// console.time("asd") // // console.time("asd")
// ctx.response.body = {a:1}; // // ctx.response.body = {a:1};
await next() // await next()
// console.log("执行") // // console.log("执行")
// console.timeEnd("asd") // // console.timeEnd("asd")
}); // });
const bodyParser = require('koa-bodyparser'); const bodyParser = require('koa-bodyparser');