1234567891011121314151617181920 |
- 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, {
- cors: true,
- });
- app.setGlobalPrefix('/api/v1');
- const config = new DocumentBuilder()
- .setTitle('Milvus insight')
- .setVersion('1.0')
- .build();
- const document = SwaggerModule.createDocument(app, config);
- SwaggerModule.setup('api', app, document);
- await app.listen(3000);
- }
- bootstrap();
|