@qiwi/mware-context

1.14.1 • Public • Published

@qiwi/mware-context

Middleware to attach CLS-based context to current request.

Install

#yarn
yarn add @qiwi/mware-context
#npm
npm i @qiwi/mware-context

Usage

import clscxt, {DEFAULT_NS, getContext} from '@qiwi/mware-context'

import express from 'express'

const app = express()
app.use(clscxt({ns: DEFAULT_NS}))

app.get('/foo/bar', (req, res) => {
  getContext().get('some-value-like-trace')
})

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i @qiwi/mware-context

Weekly Downloads

11

Version

1.14.1

License

MIT

Unpacked Size

7.52 kB

Total Files

6

Last publish

Collaborators

  • antongolub
  • qiwibot