Skip to content

Instantly share code, notes, and snippets.

@rskhan167
Created October 13, 2021 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rskhan167/2ed73493e641e52b3085217e0fa7f6a8 to your computer and use it in GitHub Desktop.
Save rskhan167/2ed73493e641e52b3085217e0fa7f6a8 to your computer and use it in GitHub Desktop.
Nestjs Series
import { NestFactory } from '@nestjs/core';
import { SwaggerModule, DocumentBuilder } from '@nestjs/swagger';
import { AppModule } from './app.module';
async function bootstrap() {
const app = await NestFactory.create(AppModule);
app.setGlobalPrefix('api');
const swaggerConfig = new DocumentBuilder()
.setTitle('NestJS Tutorial')
.setDescription('This is a blog series tutorial.')
.setVersion('1.0')
.build();
const document = SwaggerModule.createDocument(app, swaggerConfig);
SwaggerModule.setup('api', app, document);
await app.listen(3000);
}
bootstrap();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment