Skip to content

Commit

Permalink
Add readiness check log
Browse files Browse the repository at this point in the history
  • Loading branch information
IanWoodard committed Apr 28, 2024
1 parent aaef3f0 commit 71c69f5
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
import { fork } from "child_process";
import dotenv from "dotenv";
import express, { NextFunction, Request, Response } from "express";
import * as Sentry from "@sentry/node";
import { arbitrum, base, mainnet, optimism, linea, scroll } from "viem/chains";
import helmet from "helmet";

dotenv.config();

const port = process.env.PORT || 8080;
const app = express();

Expand Down Expand Up @@ -36,7 +39,14 @@ app.use(helmet());
app.disable("x-powered-by");
app.set("trust proxy", true);

const chains = [mainnet.id, optimism.id, arbitrum.id, base.id, linea.id, scroll.id];
const chains = [
mainnet.id,
optimism.id,
arbitrum.id,
base.id,
linea.id,
scroll.id,
];

chains.forEach((chain) => {
const child = fork("lib/example.js", ["--chain", chain.toFixed(0)], {});
Expand All @@ -46,6 +56,7 @@ chains.forEach((chain) => {
});

app.get("/liquidator_readiness_check", (req, res) => {
console.log("Received readiness check");
res.send("OK");
});

Expand Down

0 comments on commit 71c69f5

Please sign in to comment.