import express from "express";import cors from "cors";const WEBHOOK_URL = process.env.WEBHOOK_URLconst SERVICE_URL = process.env.SERVICE_URLconst port = process.env.PORT || 3000;const app = express();app.use(cors());app.use(express.json());app.get("/", (req, res) => { res.send("Hello World!");});app.post("/", async (req, res) => { const body = req.body; if (body.type !== "CRASHED") { res.send("OK"); return; } fetch(WEBHOOK_URL, { body: JSON.stringify({ content: `Crashed \n\n${SERVICE_URL}`, }), headers: { "Content-Type": "application/json", }, method: "POST", }).then(() => { res.send("OK"); });});app.listen(port, () => { console.log("Server listening on port " + port);});