backend: serve internal API docs only in development mode
This commit is contained in:
parent
7df90d5522
commit
2a9ee30759
@ -58,9 +58,13 @@ const createApp = () => {
|
|||||||
app.use(`${INTERNAL_CONFIG.API_BASE_PATH_V1}/recordings`, /*mediaTypeValidatorMiddleware,*/ recordingRouter);
|
app.use(`${INTERNAL_CONFIG.API_BASE_PATH_V1}/recordings`, /*mediaTypeValidatorMiddleware,*/ recordingRouter);
|
||||||
|
|
||||||
// Internal API routes
|
// Internal API routes
|
||||||
app.use(`${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/docs`, (_req: Request, res: Response) =>
|
if (process.env.NODE_ENV === 'development') {
|
||||||
res.sendFile(internalApiHtmlFilePath)
|
// 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}/auth`, authRouter);
|
||||||
app.use(`${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/users`, userRouter);
|
app.use(`${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/users`, userRouter);
|
||||||
app.use(`${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/rooms`, internalRoomRouter);
|
app.use(`${INTERNAL_CONFIG.INTERNAL_API_BASE_PATH_V1}/rooms`, internalRoomRouter);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user