mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-04 13:59:09 +00:00
feat: implement simple healthcheck endpoint
This commit is contained in:
committed by
Carlos Valente
parent
b7e5723fb2
commit
e0377a7244
@@ -84,6 +84,11 @@ app.use(bodyParser);
|
|||||||
app.use(cookieParser());
|
app.use(cookieParser());
|
||||||
const { authenticate, authenticateAndRedirect } = makeAuthenticateMiddleware(prefix);
|
const { authenticate, authenticateAndRedirect } = makeAuthenticateMiddleware(prefix);
|
||||||
|
|
||||||
|
// implement health check route
|
||||||
|
app.get(`${prefix}/health`, (_req, res) => {
|
||||||
|
res.status(200).send('OK');
|
||||||
|
});
|
||||||
|
|
||||||
// Implement route endpoints
|
// Implement route endpoints
|
||||||
app.use(`${prefix}/login`, loginRouter); // router for login flow
|
app.use(`${prefix}/login`, loginRouter); // router for login flow
|
||||||
app.use(`${prefix}/data`, authenticate, appRouter); // router for application data
|
app.use(`${prefix}/data`, authenticate, appRouter); // router for application data
|
||||||
|
|||||||
Reference in New Issue
Block a user