-
Notifications
You must be signed in to change notification settings - Fork 31
Expand file tree
/
Copy pathmain.ts
More file actions
23 lines (20 loc) · 725 Bytes
/
main.ts
File metadata and controls
23 lines (20 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import 'dotenv/config';
import { NestFactory } from '@nestjs/core';
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
import { XeniaModule } from './src/xenia.module';
import PresentationSettings from 'src/infrastructure/presentation/settings/PresentationSettings';
async function bootstrap() {
const app = await NestFactory.create(XeniaModule, {
rawBody: true,
});
const config = new DocumentBuilder()
.setTitle('Xenia Web API')
.setDescription('')
.setVersion('1.0')
.build();
const document = SwaggerModule.createDocument(app, config);
SwaggerModule.setup('api', app, document);
app.enableCors();
await app.listen(new PresentationSettings().get().port);
}
bootstrap();