koa2-response-time
TypeScript icon, indicating that this package has built-in type declarations

0.1.1 • Public • Published

koa2-response-time

npm-v-badge npm-dt-badge travis-ci-master-badge coverge-master-badge

Add response time in response header. It's for koa2 middleware written in ES7 asnyc/await and compatible with ES5 syntax.

Installation

$ npm install koa2-response-time

Usage & Example

Import default module style:

import * as Koa from 'koa';
import responseTime from 'koa2-response-time';  // import default style
 
const app = new Koa();
app.use(responseTime())

Import the module style:

import * as Koa from 'koa';
import { responseTime } from 'koa2-response-time';  // import default style
 
const app = new Koa();
app.use(responseTime())

Dependencies (2)

Dev Dependencies (7)

Package Sidebar

Install

npm i koa2-response-time

Weekly Downloads

3

Version

0.1.1

License

MIT

Last publish

Collaborators

  • tonypythoneer