1.1.2 • Published 7 years ago

@datreeio/koa-requestid v1.1.2

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

koa-requestid Build Status

A koa middleware to generate and forward request ids between services

Install

npm install @datreeio/koa-requestid

Test

npm test

usage

basic usage

const requestId = require('@datreeio/koa-requestid')
const koa = require('koa')
const app = new koa()
app.use(
  requestId({
    headerKey: 'testKey'
  })
)

custom id generator usage

const requestId = require('@datreeio/koa-requestid')
const koa = require('koa')
const app = new koa()

app.use(
  requestId({
    headerKey: 'testKey',
    idGenerator: someIdGenerator
  })
)
1.1.2

7 years ago

1.0.1

7 years ago

1.1.1

7 years ago

1.1.0

7 years ago

1.0.0

7 years ago