Skip to content

Commit

Permalink
[feat] add support for request-received middleware (closes #76)
Browse files Browse the repository at this point in the history
  • Loading branch information
niftylettuce committed Jun 13, 2019
1 parent 6bec129 commit 17cdb74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Expand Up @@ -56,7 +56,7 @@ function dev (opts) {

return async function logger (ctx, next) {
// request
const start = Date.now()
const start = ctx[Symbol.for('request-received.startTime')] ? ctx[Symbol.for('request-received.startTime')].getTime() : Date.now()
print(' ' + chalk.gray('<--') +
' ' + chalk.bold('%s') +
' ' + chalk.gray('%s'),
Expand Down

0 comments on commit 17cdb74

Please sign in to comment.