优化架构,新增路由
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
/*响应时间*/
|
||||
module.exports = {
|
||||
sort: 1, //排序
|
||||
use : true, // 是否使用
|
||||
fun : async (ctx, next, app) => {
|
||||
// console.log(ctx, next, options);
|
||||
// const timetaken = `${ctx.request.method}${ctx.request.url} 响应时间`
|
||||
// console.time(timetaken)
|
||||
await next()
|
||||
// console.timeEnd(timetaken)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user