import { t as configSchema } from "../chunks/load-config-B-HgADq2.js";
//#region src/scripts/health-check.js
var protocol = configSchema.get("https.key") && configSchema.get("https.cert") ? "https" : "http";
var hostname = configSchema.get("hostname") === "::" ? "localhost" : configSchema.get("hostname");
fetch(`${protocol}://${hostname}:${configSchema.get("port")}/health`).then((res) => res.json()).then((res) => {
	if (res.status !== "UP") throw new Error("Health check failed: Server responded to health check with status " + res.status);
}).catch((err) => {
	console.log("Health check failed:", err);
	process.exit(1);
});
//#endregion
export {};

//# sourceMappingURL=health-check.js.map