You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to use this module to calculate the response times, but don't want to send back a header. Instead, I want to provide a callback that will be called when the response time is calculated so I can then store this in a stats db/tracker.
Thoughts?
The text was updated successfully, but these errors were encountered:
Ok, so I'm thinking of just making it accept a function over the options object all together. Basically what it does is makes the middleware constructor even more polymorphic. The first argument can be a function and it'll be invoked with the response time.
app.use(responseTime(function(req,res,time){// do something}))
I want to use this module to calculate the response times, but don't want to send back a header. Instead, I want to provide a callback that will be called when the response time is calculated so I can then store this in a stats db/tracker.
Thoughts?
The text was updated successfully, but these errors were encountered: