2.0.0 • Published 7 years ago

rq-jin v2.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

rq-jin

Based on the Japanese word jin from Tenjin and rq - short for request Express middleware request logger for normalised request objects

CircleCI

Instalation

npm i -S rq-jin

Usage

import Rqjin from 'rq-jin';

// OPTIONAL - defaults to ['x-request-id', 'x-device-id']
const headerList = ['request-header-1', 'request-header-2'];

 // OPTIONAL - defaults to cover all HTTP methods to '/swagger', '/health' and '/docs'
const skippedPathsList = [{ method: '*', path: '/custom' }, { method: 'GET', path: '/terms' }];

const rqjin = new Rqjin({ headerWhiteList: headerList, requestsToSkip: skippedPathsList });

const app = express()
  .use(rqjin.logger())