Wednesday, 26 April 2017

How to get the response time in node js

Recently I started putting response time to my API's.I tried putting to my routes but I am not sure how to use it.My aim is to get the response time in the console for each request.

var responseTime = require('response-time')
app.use(responseTime());
app.route('/getAllUsers').get(users.getUsers); 

Can anyone please suggest help.Thanks.



via MMR

No comments:

Post a Comment