0.1.0 • Published 5 years ago
koa-profiler-middleware v0.1.0
koa-profiler-middleware
A lightweight profiling middleware for Koa. Outputs the HTTP method, endpoint requested and duration of request in ms.
Usage
import Koa from 'koa';
import profiler from 'koa-profiler-middleware';
const app = new Koa();
app.use(profiler());
// Example response:
// GET /hello 1.23ms
Parameters
Option | Default value | Description |
---|---|---|
logFn | console.info | The logging function to be called by the middleware. |
0.1.0
5 years ago