import { NestFactory } from '@nestjs/core'; import { AppModule } from './app.module'; import { NestExpressApplication } from '@nestjs/platform-express'; import Database from '~/db/database'; const sleep = (ms: number) => new Promise(r => setTimeout(r, ms)); async function bootstrap() { await sleep(2000); await Database.init(); const app = await NestFactory.create(AppModule); app.enableCors(); await app.listen(3001); } bootstrap();