Spaces:
Runtime error
Runtime error
File size: 430 Bytes
cd8bd0a | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 | import { readFile } from "fs/promises";
import path from "path";
import { NextResponse } from "next/server";
export async function GET() {
try {
const filePath = path.join(process.cwd(), "docs/guides/CODEX-CLI-CONFIGURATION.md");
const content = await readFile(filePath, "utf-8");
return NextResponse.json({ content });
} catch {
return NextResponse.json({ error: "Guide not found" }, { status: 404 });
}
}
|