Skip to content

Commit

Permalink
fix: ajust environments
Browse files Browse the repository at this point in the history
  • Loading branch information
William Koller committed Apr 27, 2022
1 parent 058e3a6 commit b708630
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions src/modules/app/app.settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { AwsModule } from '@/modules/aws/aws.module';
import { BooksModule } from '@/modules/books/books.module';
import { UsersModule } from '@/modules/users/users.module';
import { forwardRef } from '@nestjs/common';
import { ConfigModule, ConfigService } from '@nestjs/config';
import { ConfigModule } from '@nestjs/config';
import { MongooseModule } from '@nestjs/mongoose';
import { CacheModule } from '@/modules/cache/cache.module';
import { ScheduleModule } from '@nestjs/schedule';
Expand All @@ -18,13 +18,14 @@ export const imports = [
envFilePath: envFolderPath.folderPath,
load: [environments],
}),
MongooseModule.forRootAsync({
imports: [ConfigModule],
inject: [ConfigService],
useFactory: async (config: ConfigService) => ({
uri: config.get<string>('mongoUri'),
}),
}),
// MongooseModule.forRootAsync({
// imports: [ConfigModule],
// inject: [ConfigService],
// useFactory: async (config: ConfigService) => ({
// uri: config.get<string>('mongoUri'),
// }),
// }),
MongooseModule.forRoot(process.env.MONGODB_URI),
ScheduleModule.forRoot(),
forwardRef(() => BooksModule),
forwardRef(() => UsersModule),
Expand Down

0 comments on commit b708630

Please sign in to comment.