ESAMuchRechner/server/src/main.ts

18 lines
468 B
TypeScript

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<NestExpressApplication>(AppModule);
app.enableCors();
await app.listen(3001);
}
bootstrap();