ai_api / src /app /api /docs /codex-cli /route.ts
Yogesh
initial deploy
cd8bd0a
Raw
History Blame Contribute Delete
430 Bytes
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 });
}
}