Add GET route to return app vAdd GET /version route to provide application version and timestampersion and timestamp

This commit is contained in:
Alexa Amundson
2025-11-19 14:53:28 -06:00
committed by GitHub
parent cd1f1c8f18
commit a3e261c371

9
src/app/version/route.ts Normal file
View File

@@ -0,0 +1,9 @@
import { NextResponse } from 'next/server';
export async function GET() {
const version = process.env.npm_package_version ?? 'unknown';
return NextResponse.json({
version,
timestamp: new Date().toISOString(),
});
}