import type { NextConfig } from "next" const BACKEND_PORT = process.env.BACKEND_PORT ?? 8632 const BACKEND_URL = `http://${process.env.BACKEND_URL ?? "localhost"}:${BACKEND_PORT}` const nextConfig: NextConfig = { async rewrites() { return [ { source: "/api/:path*", destination: `${BACKEND_URL}/:path*`, }, ] }, } export default nextConfig