All checks were successful
forgejo/Procyon/seedling/pipeline/head This commit looks good
28 lines
599 B
TypeScript
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();
|