forked from Shared/esg
database migrated to POSTGRESQL
This commit is contained in:
+4
-5
@@ -1,6 +1,7 @@
|
||||
import { MiddlewareConsumer, Module, NestModule } from '@nestjs/common';
|
||||
import { MongooseModule } from '@nestjs/mongoose';
|
||||
import { ConfigService } from '@nestjs/config';
|
||||
import { TypeOrmModule } from '@nestjs/typeorm';
|
||||
import { typeOrmConfig } from './database/typeorm.config';
|
||||
import { CommonModule } from './common/common.module';
|
||||
import { RequestIdMiddleware } from './common/middleware/request-id.middleware';
|
||||
import { AppConfigModule } from './config/config.module';
|
||||
@@ -23,11 +24,9 @@ import { IdempotencyModule } from './idempotency/idempotency.module';
|
||||
AppConfigModule,
|
||||
CommonModule,
|
||||
AuditModule,
|
||||
MongooseModule.forRootAsync({
|
||||
TypeOrmModule.forRootAsync({
|
||||
inject: [ConfigService],
|
||||
useFactory: (config: ConfigService) => ({
|
||||
uri: config.get<string>('mongodb.uri'),
|
||||
}),
|
||||
useFactory: typeOrmConfig,
|
||||
}),
|
||||
RateLimitModule,
|
||||
LoggingModule,
|
||||
|
||||
Reference in New Issue
Block a user