import { config } from 'dotenv' ; import { NestFactory } from '@nestjs/core' ; import { NestExpressApplication } from '@nestjs/platform-express' ; import { NextModule } from '@nestpress/next' ; import { AppModule } from './app.module' ; import { LogicModule } from './logics/logic.module' ; async function bootstrap ( ) { config ( ) ; const app = await NestFactory . create < NestExpressApplication > ( AppModule ) ; app . get ( LogicModule ) . initialize ( app ) ; app . get ( NextModule ) . prepare ( ) . then ( ( ) => { app . listen ( process . env . PORT , '0.0.0.0' , ( ) => { console . log ( `[ ARK ] Ready on ${ process . env . HOST }:${ process . env . PORT }` ) ; } ) ; } ) ; } bootstrap ( ) ;