Skip to content

Commit fcb1ae4

Browse files
committed
refactor: update API documentation route from '/api/doc' to '/docs' and change global prefix from '/api/v1' to '/v1' for improved clarity and consistency
1 parent b709f6d commit fcb1ae4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

apps/backend/src/lib/initializeSwagger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,5 @@ export function initializeSwagger(app: INestApplication<any>) {
2121
},
2222
};
2323

24-
SwaggerModule.setup('api/doc', app, document, swaggerOptions);
24+
SwaggerModule.setup('docs', app, document, swaggerOptions);
2525
}

apps/backend/src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const logger: Logger = new Logger('main.ts');
1010

1111
async function bootstrap() {
1212
const app = await NestFactory.create(AppModule);
13-
app.setGlobalPrefix('api/v1');
13+
app.setGlobalPrefix('v1');
1414

1515
const parseTokenPipe = app.get<ParseTokenPipe>(ParseTokenPipe);
1616

@@ -56,7 +56,7 @@ bootstrap()
5656
logger.warn(`Application is running on: http://localhost:${port}`);
5757

5858
if (process.env.NODE_ENV === 'development') {
59-
logger.warn(`Swagger is running on: http://localhost:${port}/api/doc`);
59+
logger.warn(`Swagger is running on: http://localhost:${port}/docs`);
6060
}
6161
})
6262
.catch((error) => {

0 commit comments

Comments
 (0)