diff --git a/backend/src/server.ts b/backend/src/server.ts index 72688e8..63249f0 100644 --- a/backend/src/server.ts +++ b/backend/src/server.ts @@ -58,9 +58,13 @@ const createApp = () => { app.use(`${INTERNAL_CONFIG.API_BASE_PATH_V1}/recordings`, /*mediaTypeValidatorMiddleware,*/ recordingRouter); // Internal API routes - app.use(`${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/docs`, (_req: Request, res: Response) => - res.sendFile(internalApiHtmlFilePath) - ); + if (process.env.NODE_ENV === 'development') { + // Serve internal API docs only in development mode + app.use(`${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/docs`, (_req: Request, res: Response) => + res.sendFile(internalApiHtmlFilePath) + ); + } + app.use(`${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/auth`, authRouter); app.use(`${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/users`, userRouter); app.use(`${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/rooms`, internalRoomRouter);