import { NextResponse } from "next/server";

export const runtime = "nodejs";

/**
 * Health check endpoint for Docker / Nginx upstream / monitoring
 * Returns 200 if the app is reachable. DB check is intentionally
 * not included — that's a separate /api/health/db endpoint we'll
 * add later (so a slow DB doesn't trigger restarts).
 */
export async function GET() {
  return NextResponse.json({
    status: "ok",
    service: "website-tuvi",
    timestamp: new Date().toISOString(),
    version: process.env.npm_package_version ?? "0.1.0",
  });
}
