Add GET route to return app vAdd GET /version route to provide application version and timestampersion and timestamp
This commit is contained in:
9
src/app/version/route.ts
Normal file
9
src/app/version/route.ts
Normal 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(),
|
||||||
|
});
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user