Answers for "swagger with nest"

0

swagger with nest

$ npm install --save @nestjs/swagger swagger-ui-express
Posted by: Guest on September-25-2021
0

swagger with nest

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);

  const config = new DocumentBuilder()
    .setTitle('Cats example')
    .setDescription('The cats API description')
    .setVersion('1.0')
    .addTag('cats')
    .build();
  const document = SwaggerModule.createDocument(app, config);
  SwaggerModule.setup('api', app, document);

  await app.listen(3000);
}
bootstrap();
Posted by: Guest on September-25-2021
0

swagger with nest

$ npm install --save @nestjs/swagger fastify-swagger
Posted by: Guest on September-25-2021

Browse Popular Code Answers by Language