update readme
This commit is contained in:
parent
da6c63da59
commit
aac3d70895
1 changed files with 4 additions and 4 deletions
|
@ -52,7 +52,7 @@ app.use((ctx, next) => {
|
||||||
const start = new Date;
|
const start = new Date;
|
||||||
return next().then(() => {
|
return next().then(() => {
|
||||||
const ms = new Date - start;
|
const ms = new Date - start;
|
||||||
console.log(`${ctx.method} ${ctx.url} - ${ms}`);
|
console.log(`${ctx.method} ${ctx.url} - ${ms}ms`);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ app.use(async (ctx, next) => {
|
||||||
const start = new Date;
|
const start = new Date;
|
||||||
await next();
|
await next();
|
||||||
const ms = new Date - start;
|
const ms = new Date - start;
|
||||||
console.log(`${ctx.method} ${ctx.url} - ${ms}`);
|
console.log(`${ctx.method} ${ctx.url} - ${ms}ms`);
|
||||||
});
|
});
|
||||||
|
|
||||||
// response
|
// response
|
||||||
|
@ -104,7 +104,7 @@ app.use(co.wrap(function *(ctx, next){
|
||||||
const start = new Date;
|
const start = new Date;
|
||||||
yield next();
|
yield next();
|
||||||
const ms = new Date - start;
|
const ms = new Date - start;
|
||||||
console.log(`${ctx.method} ${ctx.url} - ${ms}`);
|
console.log(`${ctx.method} ${ctx.url} - ${ms}ms`);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// response
|
// response
|
||||||
|
@ -131,7 +131,7 @@ app.use(convert(function *(next){
|
||||||
const start = new Date;
|
const start = new Date;
|
||||||
yield next;
|
yield next;
|
||||||
const ms = new Date - start;
|
const ms = new Date - start;
|
||||||
console.log(`${this.method} ${this.url} - ${ms}`);
|
console.log(`${this.method} ${this.url} - ${ms}ms`);
|
||||||
}));
|
}));
|
||||||
|
|
||||||
// response
|
// response
|
||||||
|
|
Loading…
Reference in a new issue