Skip to content

Commit a0ee9b3

Browse files
committed
Add global API prefix
1 parent 1d3ec10 commit a0ee9b3

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

src/api/health-check/healthCheck.controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export class HealthCheckController {
1919

2020
@Public()
2121
@Version([VERSION_NEUTRAL, '1'])
22-
@Get('/healthcheck')
22+
@Get('/health')
2323
healthCheck(): Promise<GetHealthCheckResponseDto> {
2424
const response = new GetHealthCheckResponseDto();
2525

src/config/config.env.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,8 @@ export class ConfigEnv {
1616

1717
@IsString()
1818
AUTH0_CLIENT_ID!: string;
19+
20+
@IsString()
21+
@IsOptional()
22+
API_BASE = '/v6/mcp';
1923
}

src/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ async function bootstrap() {
88

99
const logger = new Logger('bootstrap()');
1010

11+
// Global prefix for all routes
12+
app.setGlobalPrefix(ENV_CONFIG.API_BASE);
13+
1114
// Add an event handler to log uncaught promise rejections and prevent the server from crashing
1215
process.on('unhandledRejection', (reason, promise) => {
1316
logger.error('Unhandled Rejection at:', promise, 'reason:', reason);

0 commit comments

Comments
 (0)