Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

swagger with nest


$ npm install --save @nestjs/swagger swagger-ui-express
Comment

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

nestjs swagger

import { NestFactory } from '@nestjs/core';
import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
import { AppModule } from './app.module';

async function bootstrap() {
  const app = await NestFactory.create(AppModule);

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

  await app.listen(3000);
  console.log(`Application is running on: ${await app.getUrl()}`);
}
bootstrap();
Comment

swagger with nest


$ npm install --save @nestjs/swagger fastify-swagger
Comment

PREVIOUS NEXT
Code Example
Javascript :: javascript open window 
Javascript :: how to send js array from ajax 
Javascript :: chrome.storage.local delete 
Javascript :: javascript classlist to array 
Javascript :: javascript append list 
Javascript :: render image in vue 
Javascript :: nodejs: basic: send html page to Browser 
Javascript :: javascript prototype inheritance example 
Javascript :: overflowx 
Javascript :: javaScript setFullYear() Method 
Javascript :: mysql json 
Javascript :: adding debounce in autocomplete material ui 
Javascript :: angular scroll to element horizontally 
Javascript :: js reduce 
Javascript :: js play sound 
Javascript :: angular infinite scroll 
Javascript :: load.json 
Javascript :: datatables and toggle not working 
Javascript :: get total pairs from integer array javascript 
Javascript :: js array as parameter 
Javascript :: loop through async javascript -4 
Javascript :: javascript some method 
Javascript :: js delete all cookies 
Javascript :: passing argument to function handler functional compoent javascript react 
Javascript :: C# Convert Json File to DataTable 
Javascript :: alert javascript react native 
Javascript :: db.json code 
Javascript :: jquery onclick multiple buttons 
Javascript :: next js cookie 
Javascript :: js ternary else if multi 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =