edited swagger link
This commit is contained in:
+6
-10
@@ -14,20 +14,16 @@ async function bootstrap() {
|
||||
|
||||
const port = configService.get<number>('app.port', 3000);
|
||||
app.setGlobalPrefix('api/v1');
|
||||
|
||||
|
||||
const config = new DocumentBuilder()
|
||||
.setTitle("P'titsPas API")
|
||||
.setVersion('1.0.0')
|
||||
.build();
|
||||
.setTitle("P'titsPas API")
|
||||
.setVersion('1.0.0')
|
||||
.build();
|
||||
|
||||
const document = SwaggerModule.createDocument(app, config);
|
||||
SwaggerModule.setup('api/docs', app, document);
|
||||
SwaggerModule.setup('api-docs', app, document);
|
||||
|
||||
|
||||
const reflector = app.get(Reflector);
|
||||
app.useGlobalGuards(
|
||||
new AuthGuard(app.get(JwtService), app.get(Reflector)),
|
||||
new RolesGuard(app.get(Reflector))
|
||||
);
|
||||
|
||||
await app.listen(port);
|
||||
console.log(`✅ P'titsPas API is running on: ${await app.getUrl()}`);
|
||||
|
||||
Reference in New Issue
Block a user