This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const middleware = [] | |
let mw1 = async function (ctx, next) { | |
console.log("next前,第一个中间件", new Date().getTime()) | |
await next() | |
console.log("next后,第一个中间件", new Date().getTime()) | |
} | |
let mw2 = async function (ctx, next) { | |
console.log("next前,第二个中间件", new Date().getTime()) | |
await next() | |
console.log("next后,第二个中间件", new Date().getTime()) |
OlderNewer