Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions web-server/app/ping/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { NextResponse } from "next/server";

export function GET() {
return new NextResponse('OK', {
status: 200,
headers: {
'Content-Type': 'text/plain',
'Cache-Control': 'no-store',
'X-Robots-Tag': 'noindex'
},
});
}
25 changes: 25 additions & 0 deletions web-server/app/status/route.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { NextResponse } from 'next/server';
import { readFileSync } from 'node:fs';
import { join } from 'node:path';

let version = 'unknown';
try {
const pkgPath = join(process.cwd(), 'package.json');
const pkgJson = JSON.parse(readFileSync(pkgPath, 'utf8'));
version = pkgJson.version || 'unknown';
} catch (err) {
console.warn('status route: failed to read package.json for version', err instanceof Error ? err.message : err);
}

export async function GET() {
return NextResponse.json({
status: 'OK',
version,
},
{
headers: {
'Cache-Control': 'no-store',
'X-Robots-Tag': 'noindex',
},
});
}