{"repo":"expressjs/response-time","free":true,"listed":false,"github":"https://github.com/expressjs/response-time","clone":"git clone https://github.com/expressjs/response-time.git","description":"Response time header for node.js","language":"JavaScript","stars":496,"topics":["javascript","nodejs","middleware","response-time"],"license":"MIT","category":"dev-tools","readme_excerpt":"response-time [![NPM Version][npm-version-image]][npm-url] [![NPM Downloads][npm-downloads-image]][npm-url] [![Node.js Version][node-image]][node-url] [![Build Status][ci-image]][ci-url] [![Test Coverage][coveralls-image]][coveralls-url] Response time for Node.js servers. This module creates a middleware that records the response time for requests in HTTP servers. The \"response time\" is defined here as the elapsed time from when a request enters this middleware to when the headers are written out to the client. Installation This is a Node.js module available through the npm registry. Installation is done using the npm install command: API responseTime([options]) Create a middleware that adds a X-Response-Time header to responses. If you don't want to use this module to automatically set a header, please see the section about responseTime(fn) . Options The responseTime function accepts an optional options object that may contain any of the following keys: digits The fixed number of digits to include in the output, which is always in milliseconds, defaults to 3 (ex: 2.300ms ). header The name of the header to set, defaults to X-Response-Time . suffix Boolean to indicate if units of measurement suffix should be added to the output, defaults to true (ex: 2.300ms vs 2.300 ). responseTime(fn) Create a new middleware that records the response time of a request and makes this available to your own function fn . The fn argument will be invoked as fn(req, res, time) , where time is a n","default_branch":null,"files":null,"tree":[],"storefront":"/r/expressjs","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/expressjs/response-time/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}