Skip to content
Snippets Groups Projects
main.ts 504 B
Newer Older
  • Learn to ignore specific revisions
  • Hugo SUBTIL's avatar
    Hugo SUBTIL committed
    import { NestFactory } from '@nestjs/core';
    
    import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger';
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
    import { AppModule } from './app.module';
    
    async function bootstrap() {
      const app = await NestFactory.create(AppModule);
    
    
      const options = new DocumentBuilder().setTitle('RAM').setDescription('RAM API description').setVersion('1.0').build();
      const document = SwaggerModule.createDocument(app, options);
      SwaggerModule.setup('api', app, document);
    
    Hugo SUBTIL's avatar
    Hugo SUBTIL committed
      await app.listen(3000);
    }
    bootstrap();