debug route
This commit is contained in:
parent
59cbd8002a
commit
2a105e3892
1 changed files with 17 additions and 0 deletions
17
app/api/debug/meta/route.ts
Normal file
17
app/api/debug/meta/route.ts
Normal file
|
|
@ -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(),
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue