Files
headplane/app/routes/util/healthz.ts
T
2026-05-25 17:14:26 -04:00

13 lines
346 B
TypeScript

import type { Route } from "./+types/healthz";
export async function loader({ context }: Route.LoaderArgs) {
const healthy = await context.headscale.health();
return new Response(JSON.stringify({ status: healthy ? "OK" : "ERROR" }), {
status: healthy ? 200 : 500,
headers: {
"Content-Type": "application/json",
},
});
}