add health check endpoint and update webserver routes
This commit is contained in:
7
src/web/health.ts
Normal file
7
src/web/health.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { Express } from 'express';
|
||||
|
||||
export default function healthRoute(app: Express) {
|
||||
app.get('/health', (req, res) => {
|
||||
res.status(200).send('ok');
|
||||
});
|
||||
}
|
||||
@@ -26,7 +26,7 @@ export default async function webserver() {
|
||||
});
|
||||
|
||||
const IgnoredPaths = ['/favicon.ico', '/robots.txt', "/", "/hello"];
|
||||
const KnownPaths = ["/git-commit", "/"];
|
||||
const KnownPaths = ["/git-commit", "/", "/health"];
|
||||
|
||||
// log all incoming requests
|
||||
app.use((req, res, next) => {
|
||||
|
||||
Reference in New Issue
Block a user