nightingale-web-processor
TypeScript icon, indicating that this package has built-in type declarations

15.0.0 • Public • Published

nightingale-web-processor

Nightingale web processor

Install

npm install --save nightingale-web-processor

Usage

import Koa from 'koa';
import webProcessor from 'nightingale-web-processor';

configure([
  {
    key: 'app',
    handlers: [new ConsoleHandler(Level.ALL)],
    processors: [webProcessor],
  },
]);

const app = new Koa();

app.use((ctx, next) => {
  ctx.logger = appLogger.context({ request: ctx.req });
  return next();
});

app.use(async (ctx) => {
  ctx.logger.info('got request !');
  ctx.body = 'ok';
});

Package Sidebar

Install

npm i nightingale-web-processor

Weekly Downloads

59

Version

15.0.0

License

ISC

Unpacked Size

19.4 kB

Total Files

10

Last publish

Collaborators

  • churpeau