import { NestFactory } from '@nestjs/core' ; import { ConfigService } from '@nestjs/config' ; import { AppModule } from './app.module' ; async function bootstrap ( ) { const app = await NestFactory . create ( AppModule ) ; const configService = app . get < ConfigService > ( ConfigService ) ; await app . listen ( configService . get < number > ( 'app.port' ) , configService . get < string > ( 'app.host' ) ) ; } bootstrap ( ) ;