seedling/source/rest/src/main.ts
romanjaros da23b80647
All checks were successful
forgejo/Procyon/seedling/pipeline/head This commit looks good
Rename source folders
2023-10-24 20:43:21 +02:00

28 lines
599 B
TypeScript

// @ts-nocheck
import { NestFactory } from '@nestjs/core';
import { AppModule } from './app.module';
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
// swagger
SwaggerModule.setup(
'api',
app,
SwaggerModule.createDocument(
app,
new DocumentBuilder()
.setTitle('$(AppName) API')
.setDescription('The $(AppName) API description.')
.setVersion('0.1.0')
.addServer('/api/v1')
.build(),
),
);
app.setGlobalPrefix('/api/v1');
await app.listen(8080);
}
bootstrap();