Advertisement
nodejsdeveloperskh

app.module mongoose.forRootAsync

Jun 2nd, 2021
228
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import { MongooseAsyncOptions } from './configs/mongodb.config';
  2. @Module({
  3.    imports: [
  4.        ConfigModule.forRoot({
  5.            envFilePath: ['.env', '.env.mongo'],
  6.            isGlobal: true,
  7.            load: [databaseEnv, appEnv, authEnv],
  8.        }),
  9.        MongooseModule.forRootAsync(MongooseAsyncOptions),
  10.        TicketDepartmentsModule,
  11.        DatabaseModule,
  12.    ],
  13.    controllers: [AppController],
  14.    providers: [AppService],
  15. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement