Spaces:
Runtime error
Runtime error
| 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 }); | |
| } | |
| } | |