SPB Git

spb/llmindex Public

The discriminative, contamination-resistant, fully transparent LLM ranking — updated live.

TypeScript 77.9% TeX 15.2% Python 3.7% SQL 1.4% JavaScript 1.1% Shell 0.5%
626 B · 26 lines typescript
Raw Blame History
1/**2 * llmindex.io — GET /api/v1/health3 * Author:  Simon-Pierre Boucher4 * Contact: contact@spboucher.ai5 * License: Proprietary — © Simon-Pierre Boucher, all rights reserved6 */7import { prisma } from '@llmindex/db';8import { INDEX_VERSION } from '@llmindex/scoring';9import { apiJson } from '@/lib/api';1011export const dynamic = 'force-dynamic';1213export async function GET() {14  let db = false;15  try {16    await prisma.$queryRaw`SELECT 1`;17    db = true;18  } catch {19    db = false;20  }21  return apiJson(22    { status: db ? 'ok' : 'degraded', db, index_version: INDEX_VERSION },23    { status: db ? 200 : 503 },24  );25}26