From 2a105e38925e7641c2eadd602ad0231ea4708994 Mon Sep 17 00:00:00 2001 From: makearmy Date: Thu, 2 Oct 2025 20:01:35 -0400 Subject: [PATCH] debug route --- app/api/debug/meta/route.ts | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 app/api/debug/meta/route.ts diff --git a/app/api/debug/meta/route.ts b/app/api/debug/meta/route.ts new file mode 100644 index 00000000..b9ddf63a --- /dev/null +++ b/app/api/debug/meta/route.ts @@ -0,0 +1,17 @@ +// app/api/debug/meta/route.ts +import { NextResponse } from "next/server"; +import { promises as fs } from "fs"; +export async function GET() { + let buildId = null; + try { + buildId = (await fs.readFile(process.cwd() + "/.next/BUILD_ID", "utf8")).trim(); + } catch {} + return NextResponse.json({ + env: process.env.NEXT_PUBLIC_ENV || null, + nodeEnv: process.env.NODE_ENV || null, + buildId, + image: process.env.IMAGE_TAG || null, + commit: process.env.COMMIT_SHA || null, + time: new Date().toISOString(), + }); +}