Skip to content

Commit a2ad0b0

Browse files
committed
add healthcheck endpoint
1 parent ced9cc0 commit a2ad0b0

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

packages/backend/index.js

+4-12
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,6 @@ const { trackPlausibleEvent } = require("./services/plausible");
1919
const app = express();
2020
const autogradingEnabled = process.env.NODE_ENV !== "test" && !!process.env.AUTOGRADING_SERVER;
2121

22-
/*
23-
Uncomment this if you want to create a wallet to send ETH or something...
24-
const INFURA = JSON.parse(fs.readFileSync("./infura.txt").toString().trim())
25-
const PK = fs.readFileSync("./pk.txt").toString().trim()
26-
let wallet = new ethers.Wallet(PK,new ethers.providers.InfuraProvider("goerli",INFURA))
27-
console.log(wallet.address)
28-
const checkWalletBalance = async ()=>{
29-
console.log("BALANCE:",ethers.utils.formatEther(await wallet.provider.getBalance(wallet.address)))
30-
}
31-
checkWalletBalance()
32-
*/
33-
3422
app.use(cors());
3523

3624
app.use(bodyParser.json());
@@ -40,6 +28,10 @@ app.use("/events", eventsRoutes);
4028
app.use("/builds", buildsRoutes);
4129
app.use("/bg", bgRoutes);
4230

31+
app.get("/healthcheck", (_, res) => {
32+
res.status(200).send("ok");
33+
});
34+
4335
app.get("/sign-message", (req, res) => {
4436
const messageId = req.query.messageId ?? "login";
4537
const options = req.query;

0 commit comments

Comments
 (0)