nexusbert commited on
Commit
210936d
·
1 Parent(s): 989191e

Fix Swagger UI configuration and server URLs

Browse files
cruciqe-id-card-backend/src/config/swagger.ts CHANGED
@@ -12,8 +12,8 @@ const swaggerDefinition = {
12
  },
13
  servers: [
14
  {
15
- url: process.env.API_URL || 'http://localhost:4000',
16
- description: 'Development server',
17
  },
18
  ],
19
  components: {
@@ -225,7 +225,12 @@ const swaggerDefinition = {
225
 
226
  const options = {
227
  definition: swaggerDefinition,
228
- apis: ['./src/index.ts', './src/controllers/*.ts'],
 
 
 
 
 
229
  }
230
 
231
  export const swaggerSpec = swaggerJsdoc(options)
 
12
  },
13
  servers: [
14
  {
15
+ url: process.env.API_URL || (process.env.SPACE_URL ? `https://${process.env.SPACE_URL}` : 'http://localhost:7860'),
16
+ description: 'API Server',
17
  },
18
  ],
19
  components: {
 
225
 
226
  const options = {
227
  definition: swaggerDefinition,
228
+ apis: [
229
+ './src/index.ts',
230
+ './src/controllers/*.ts',
231
+ './dist/index.js',
232
+ './dist/controllers/*.js'
233
+ ],
234
  }
235
 
236
  export const swaggerSpec = swaggerJsdoc(options)