From f7fd0113461879bc10fabb2ab51d07551342e906 Mon Sep 17 00:00:00 2001 From: Hugo SUBTIL <ext.sopra.husubtil@grandlyon.com> Date: Tue, 1 Feb 2022 15:08:14 +0100 Subject: [PATCH] feat(routing): update global routing of api --- src/main.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index d4287f501..5f6620aa8 100644 --- a/src/main.ts +++ b/src/main.ts @@ -7,13 +7,14 @@ async function bootstrap() { const app = await NestFactory.create(AppModule); app.useGlobalPipes(new ValidationPipe()); const options = new DocumentBuilder() - .setTitle('RAM') - .setDescription('RAM API description') + .setTitle(`Res'in`) + .setDescription(`Res'in API documentation`) .setVersion('1.0') .addBearerAuth({ type: 'http', scheme: 'bearer', bearerFormat: 'JWT' }, 'JWT') .build(); const document = SwaggerModule.createDocument(app, options); - SwaggerModule.setup('api', app, document); + SwaggerModule.setup('doc', app, document); + app.setGlobalPrefix('api'); await app.listen(3000); } bootstrap(); -- GitLab