Standardize Prism Console service metadata and health endpoints

This commit is contained in:
Alexa Amundson
2025-11-20 20:29:13 -06:00
parent d17575c6b8
commit 9dd7501946
13 changed files with 260 additions and 91 deletions

View File

@@ -1,13 +1,16 @@
import { NextResponse } from 'next/server';
import { pollServiceHealth, serverConfig } from '@/lib/config';
import { SERVICE_ID } from '@/config/serviceConfig';
export async function GET() {
const services = await pollServiceHealth();
const healthy = services.every((service) => service.status === 'healthy' || service.status === 'not_configured');
const payload = {
ok: healthy,
service: SERVICE_ID,
ts: new Date().toISOString(),
status: healthy ? 'ok' : 'degraded',
timestamp: new Date().toISOString(),
environment: serverConfig.environment,
version: process.env.npm_package_version ?? 'unknown',
services