The best way to control Claude Code, Codex and more from any computer or phone

main
ts 21 lines 635 Bytes
Raw
1 import { createFileRoute } from "@tanstack/react-router";
2 import { checkDatabaseReady } from "../../prisma/queries";
3
4 export const Route = createFileRoute("/api/health")({
5 server: {
6 handlers: {
7 GET: async () => {
8 await checkDatabaseReady();
9 const configurationReady = process.env.TANSTACK_SHARED_FLAG === "project-level";
10 return Response.json(
11 {
12 ok: configurationReady,
13 database: "ready",
14 configuration: configurationReady ? "ready" : "unavailable",
15 },
16 { status: configurationReady ? 200 : 503 },
17 );
18 },
19 },
20 },
21 });