@nest-middlewares/morgan
v10.0.0
Published
NestJS Middleware for Morgan
Downloads
6,256
Readme
Nest Middlewares - Morgan
This is the Nest Middleware wrapper around morgan.
Installation
@nest-middlewares/morgan
is available from NPM. You can install it with this command:
npm install --save @nest-middlewares/morgan
Usage
import { MorganMiddleware } from '@nest-middlewares/morgan';
@Module(...)
export class MyModule {
configure(consumer: MiddlewaresConsumer) {
// IMPORTANT! Call Middleware.configure BEFORE using it for routes
MorganMiddleware.configure( /* options as per morgan docs */ )
consumer.apply(MorganMiddleware).forRoutes( /* your routes */ );
}
}