22 lines
577 B
TypeScript
22 lines
577 B
TypeScript
import { NextResponse } from "next/server";
|
|
import fs from "fs";
|
|
|
|
export async function GET() {
|
|
const path = "/opt/hx-ki/workspaces/homepage/homepage.json";
|
|
|
|
try {
|
|
const raw = fs.readFileSync(path, "utf-8");
|
|
const data = JSON.parse(raw);
|
|
return NextResponse.json(data);
|
|
} catch (err) {
|
|
console.error("Error reading homepage.json:", err);
|
|
return NextResponse.json(
|
|
{
|
|
error: "Homepage content not available",
|
|
details: "Check /opt/hx-ki/workspaces/homepage/homepage.json on Falkenstein."
|
|
},
|
|
{ status: 500 }
|
|
);
|
|
}
|
|
}
|