nest-request-id
v1.0.2
Published
Middleware for managing request id headers in NestJS app.
Downloads
29
Maintainers
Readme
nest-request-id
RequestID middleware for Nest.js that adds an indentifier to the request and response.
Installation
Run npm i nest-request-id
Example
import { Module, NestModule, MiddlewareConsumer } from '@nestjs/common';
import { RequestIdMiddleware } from 'nest-request-id';
import { CatsModule } from './cats/cats.module';
@Module({
imports: [CatsModule],
})
export class AppModule implements NestModule {
configure(consumer: MiddlewareConsumer) {
consumer
.apply(RequestIdMiddleware)
.forRoutes('cats');
}
}
License
MIT License © Ivan Vasiljevic