fix build
This commit is contained in:
parent
9701f7101e
commit
48196c1ed6
30
src/main.ts
30
src/main.ts
@ -21,34 +21,12 @@ async function bootstrap() {
|
||||
.setDescription('API de gestion des utilisateurs pour le système DCB')
|
||||
.setVersion('1.0')
|
||||
.addTag('users', 'Gestion des utilisateurs')
|
||||
.addBearerAuth(
|
||||
{
|
||||
type: 'http',
|
||||
scheme: 'bearer',
|
||||
bearerFormat: 'JWT',
|
||||
name: 'JWT',
|
||||
description: 'Entrez votre token JWT',
|
||||
in: 'header',
|
||||
},
|
||||
'JWT-auth', // Nom de la référence
|
||||
)
|
||||
.addServer('http://localhost:3000', 'Développement local')
|
||||
.addServer('https://api.example.com', 'Production')
|
||||
.addBearerAuth()
|
||||
//.addServer('http://localhost:3000', 'Développement local')
|
||||
// .addServer('https://api.example.com', 'Production')
|
||||
.build();
|
||||
const document = SwaggerModule.createDocument(app, config);
|
||||
SwaggerModule.setup('api/docs', app, document, {
|
||||
customSiteTitle: 'DCB User Service API Docs',
|
||||
customfavIcon: 'https://nestjs.com/img/logo_text.svg',
|
||||
customJs: [
|
||||
'https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.15.5/swagger-ui-bundle.min.js',
|
||||
'https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.15.5/swagger-ui-standalone-preset.min.js',
|
||||
],
|
||||
customCssUrl: [
|
||||
'https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.15.5/swagger-ui.min.css',
|
||||
'https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.15.5/swagger-ui-standalone-preset.min.css',
|
||||
'https://cdnjs.cloudflare.com/ajax/libs/swagger-ui/4.15.5/swagger-ui.css',
|
||||
],
|
||||
});
|
||||
SwaggerModule.setup('api-docs', app, document);
|
||||
app.enableCors({ origin: '*' })
|
||||
|
||||
const port = process.env.PORT || 3000;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user