Version 1.1 initial commit
This commit is contained in:
11
app/api/instance/route.ts
Normal file
11
app/api/instance/route.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { NextResponse } from "next/server"
|
||||
import os from "os"
|
||||
|
||||
export async function GET() {
|
||||
try {
|
||||
return NextResponse.json({ instance: os.hostname() })
|
||||
} catch (error) {
|
||||
console.error("Instance fetch error:", error)
|
||||
return NextResponse.json({ error: "Failed to load instance name." }, { status: 500 })
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user