Skip to content

Commit

Permalink
fix healthcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
charlykeyko committed Mar 13, 2024
1 parent eaef006 commit 9a4ce91
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import express from "express";
import applicationRouter from "./server/routes";
// import { getDmobHealth } from "./services/filplusService";
// import { getBackendHealth } from "./services/backendService";
import { getDmobHealth } from "./services/filplusService";
import { getBackendHealth } from "./services/backendService";
import "./scheduler";

const app = express();
Expand All @@ -17,12 +17,12 @@ app.use("/application", applicationRouter);
* @returns Promise<void>
*/
app.get("/health", async (req, res) => {
// if (!(await getBackendHealth())) {
// return res.status(400).send("Backend service is down");
// }
// if (!(await getDmobHealth())) {
// return res.status(400).send("Dmob service is down");
// }
if (!(await getBackendHealth())) {
return res.status(400).send("Backend service is down");
}
if (!(await getDmobHealth())) {
return res.status(400).send("Dmob service is down");
}
return res.status(200).send("OK");
});

Expand Down

0 comments on commit 9a4ce91

Please sign in to comment.