import { Module } from '@nestjs/common' ; import { ConfigModule , ConfigService } from '@nestjs/config' ; import { AdminModule } from '@admin/admin.module' ; import { AuthModule } from '@modules/auth/auth.module' ; import { DatabaseModule } from '@database/database.module' ; @ Module ( { imports : [ ConfigModule . forRoot ( { envFilePath : [ '.env' ] , } ) , DatabaseModule , AdminModule , AuthModule , ] , } ) export class AppModule { static port : number ; static apiVersion : string ; static apiPrefix : string ; constructor ( private readonly configService ) { AppModule . port = + this . configService . get ( 'API_PORT' ) ; AppModule . apiVersion = this . configService . get ( 'API_VERSION' ) ; AppModule . apiPrefix = this . configService . get ( 'API_PREFIX' ) ; } }