abs-nestjs-http-logger-service
v0.0.2
Published
`HttpLoggerService` is a custom http-logger service that can be used in a NestJS to log your http request logs
Downloads
4
Readme
HttpLoggerService Documentation
HttpLoggerService is a custom http-logger service that can be used in a NestJS to log your http request logs
Installation
To install the necessary dependencies, run:
npm install abs-nestjs-http-logger-serviceUsage with NestJS
- Import the HttpLoggerService into your main.ts
import { NestFactory } from '@nestjs/core';
import { HttpLoggerService } from 'abs-nestjs-http-logger-service';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
// Use the http logger service
app.use(new HttpLoggerService().log());
await app.listen(process.env.PORT ?? 3000);
}
bootstrap();