koa2-response-time
v0.1.1
Published
Used asnyc/await syntax to make the koa2 middleware
Downloads
6
Maintainers
Readme
koa2-response-time
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())