Skip to content

Instantly share code, notes, and snippets.

View zhoufenfens's full-sized avatar
:bowtie:
i am working

zhou zhoufenfens

:bowtie:
i am working
View GitHub Profile
@zhoufenfens
zhoufenfens / koa.middleware.js
Created January 12, 2024 12:39
koa中间件
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())