@ -48,6 +48,10 @@ async function start(id, disconnect) {
|
|||||||
app.use(compress());
|
app.use(compress());
|
||||||
app.use(helmet());
|
app.use(helmet());
|
||||||
|
|
||||||
|
// install health check endpoint for all services
|
||||||
|
router.get("/_health", (ctx) => (ctx.body = "OK"));
|
||||||
|
app.use(router.routes());
|
||||||
|
|
||||||
// loop through requestsed services at startup
|
// loop through requestsed services at startup
|
||||||
for (const name of serviceNames) {
|
for (const name of serviceNames) {
|
||||||
if (!Object.keys(services).includes(name)) {
|
if (!Object.keys(services).includes(name)) {
|
||||||
@ -59,10 +63,6 @@ async function start(id, disconnect) {
|
|||||||
await init(app, server);
|
await init(app, server);
|
||||||
}
|
}
|
||||||
|
|
||||||
// install health check endpoint for all services
|
|
||||||
router.get("/_health", (ctx) => (ctx.body = "OK"));
|
|
||||||
app.use(router.routes());
|
|
||||||
|
|
||||||
server.on("error", (err) => {
|
server.on("error", (err) => {
|
||||||
throw err;
|
throw err;
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user