import { ConfigService } from './../config/config.service' ; import { Module } from '@nestjs/common' ; import { TypeOrmModule } from '@nestjs/typeorm' ; import { ConfigModule } from '../config/config.module' ; import { DatabaseModule } from '../database/database.module' ; import { AppController } from './app.controller' ; import { AppService } from './app.service' ; import { AuthModule } from '../auth/auth.module' ; import { User } from '../user/user.entity' ; @ Module ( { imports : [ AuthModule , ConfigModule , DatabaseModule , TypeOrmModule . forFeature ( [ User ] ) , ] , controllers : [ AppController ] , providers : [ AppService ] , } ) export class AppModule { static port : string | number ; static isDev : boolean ; constructor ( private readonly config ) { AppModule . port = config . get ( 'API_PORT' ) ; AppModule . isDev = config . isDev ; } }