import type { APIRoute } from "astro";

export type HealthcheckResponse = {
  isAlive: true;
};

export const GET: APIRoute = () => {
  if (import.meta.env.PROD) {
    return new Response(null, { status: 404 });
  }
  return new Response(JSON.stringify({ isAlive: !false } satisfies HealthcheckResponse), {
    headers: { "Content-Type": "application/json; charset=utf-8" },
  });
};
