# response-time **Repository Path**: mirrors_koajs/response-time ## Basic Information - **Project Name**: response-time - **Description**: X-Response-Time middleware - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-09 - **Last Updated**: 2026-05-23 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # koa-response-time [![Greenkeeper badge](https://badges.greenkeeper.io/koajs/response-time.svg)](https://greenkeeper.io/) X-Response-Time middleware for [koa](https://github.com/koajs/koa). Compatible with [request-received](https://github.com/cabinjs/request-received). ## Installation ```js $ npm install koa-response-time ``` ## Usage Basic usage: ```js const Koa = require('koa'); const responseTime = require('koa-response-time'); const app = new Koa(); app.use(responseTime()); ``` If you need response high resolution in nano time, set `hrtime` option to `true`: ```js app.use(responseTime({ hrtime: true })); ``` Sample response header with `hrtime = false` (default): ``` X-Response-Time: 153ms ``` Sample response header with `hrtime = true`: ``` X-Response-Time: 153.123581ms ``` ## Note Best to `.use()` at the _top_ before any other middleware, to wrap all subsequent middleware. ## License MIT