The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 21, 06:00 UTC
| 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 | }); |