@qiwi/nestjs-enterprise-mdc
v4.1.0
Published
MDC module for nestjs enterprise
Downloads
40
Readme
@qiwi/nestjs-enterprise-mdc
Nestjs module for working with continuation-local storage.
Installation
yarn add @qiwi/nestjs-enterprise-mdc
Configuration
import { MdcModule } from '@qiwi/nestjs-enterprise-mdc'
@Module({
imports: [
MdcModule,
// and so on
],
controllers: [],
providers: [],
})
export class AppModule {}
Usage
// main.ts
import { mdc, logger as log, clscxt } from '@qiwi/nestjs-enterprise-mdc'
async function bootstrap() {
const app = await NestFactory.create(AppModule)
//...
app
.use(clscxt())
.use(mdc())
.use(log({ logger }))
//...
Api
mdc, validator, logger, context as clscxt
see @qiwi/mware