dependencies Legend  Declarations  Module  Bootstrap  Providers  Exports cluster_AppModule cluster_AppModule_imports cluster_AppModule_providers AuthModule AuthModule AppModule AppModule AuthModule->AppModule AppService AppService AppService->AppModule

File

apps/api/src/app/app.module.ts

Providers

Controllers

Imports

import { Module } from '@nestjs/common'

import { AppController } from './app.controller'
import { AppService } from './app.service'
import { ConfigModule, ConfigService } from '@nestjs/config'

import { typeOrmConfig } from '../config/typeorm.config'
import { TypeOrmModule } from '@nestjs/typeorm'
import { TerminusModule } from '@nestjs/terminus'
import { AuthModule } from '../auth/auth.module'

@Module({
  imports: [
    TerminusModule,
    ConfigModule.forRoot({
      isGlobal: true,
      load: [typeOrmConfig]
    }),
    TypeOrmModule.forRootAsync({
      inject: [ConfigService],
      useFactory: async (configService: ConfigService) => {
        return {
          ...configService.get('typeorm'),
          /**
           * This is temporary for development
           */
          logging: 'all',
          logger: 'advanced-console'
        }
      }
    }),
    AuthModule
  ],
  controllers: [AppController],
  providers: [AppService]
})
export class AppModule {}

results matching ""

    No results matching ""