// Healthcheck für den Docker-HEALTHCHECK. Bewusst ohne Abhängigkeiten, // damit er auch dann läuft, wenn die Anwendung selbst nicht startet. const http = require("node:http"); const port = process.env.PORT || "3000"; const anfrage = http.request( { host: "127.0.0.1", port, path: "/api/health", method: "GET", timeout: 4000, }, (antwort) => { process.exit(antwort.statusCode === 200 ? 0 : 1); }, ); anfrage.on("error", () => process.exit(1)); anfrage.on("timeout", () => { anfrage.destroy(); process.exit(1); }); anfrage.end();