import type { NextConfig } from "next"; const backendUrl = process.env.CODEGRAPH_API_URL || "http://localhost:8000"; const nextConfig: NextConfig = { async rewrites() { return [ { source: "/api/:path*", destination: `${backendUrl}/api/:path*`, }, ]; }, }; export default nextConfig;