# @qiwi/mware-context

> Cls-based contextify middleware

Latest version **1.14.1** (published 2023-09-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @qiwi/mware-context
pnpm add @qiwi/mware-context
yarn add @qiwi/mware-context
bun add @qiwi/mware-context
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: no vulnerabilities; high maintenance score.

Warnings: low downloads; no types; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.14.1 |
| Published | 2023-09-19 |
| First published | 2020-03-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Anton Golub |
| Maintainers | antongolub, qiwibot, pismenskiy |
| Keywords | mware, cls |

## Links

- npm: https://www.npmjs.com/package/@qiwi/mware-context
- Repository: https://github.com/qiwi/mware
- Homepage: https://github.com/qiwi/mware#readme
- Issues: https://github.com/qiwi/mware/issues
- npm.io page: https://npm.io/package/@qiwi/mware-context

## Recent versions

- 1.14.1 (latest) — 2023-09-19
- 1.14.0 — 2022-08-16
- 1.13.0 — 2022-05-03
- 1.0.0 — 2022-05-03
- 1.12.1 — 2021-07-13
- 1.11.3 — 2021-07-01
- 1.11.2 — 2021-07-01
- 1.10.0 — 2020-03-01

## README

# @qiwi/mware-context
Middleware to attach CLS-based context to current request.

### Install
```bash
#yarn
yarn add @qiwi/mware-context
#npm
npm i @qiwi/mware-context
```

### Usage

```javascript
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

---
_Source: https://npm.io/package/@qiwi/mware-context · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
