mirror of
https://github.com/sakaljurgis/kodi-api-server.git
synced 2026-07-09 04:47:41 +00:00
create each request logger
This commit is contained in:
+14
-2
@@ -1,9 +1,15 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import {
|
||||
MiddlewareConsumer,
|
||||
Module,
|
||||
NestModule,
|
||||
RequestMethod,
|
||||
} from '@nestjs/common';
|
||||
import { ConfigModule } from '@nestjs/config';
|
||||
import { KodiApiModule } from './KodiApi/kodi-api.module';
|
||||
import { StaticModule } from './Static/static.module';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { LrtCategory } from './KodiApi/LRT/LrtApiClient/Entity/lrt-category.entity';
|
||||
import { RequestLogMiddleware } from './RequestLog/request-log.middleware';
|
||||
|
||||
@Module({
|
||||
imports: [
|
||||
@@ -19,4 +25,10 @@ import { LrtCategory } from './KodiApi/LRT/LrtApiClient/Entity/lrt-category.enti
|
||||
controllers: [],
|
||||
providers: [],
|
||||
})
|
||||
export class AppModule {}
|
||||
export class AppModule implements NestModule {
|
||||
configure(consumer: MiddlewareConsumer) {
|
||||
consumer
|
||||
.apply(RequestLogMiddleware)
|
||||
.forRoutes({ path: '/*', method: RequestMethod.ALL });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user