diff --git a/next.config.ts b/next.config.ts index dedb731..78841fb 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,11 +1,13 @@ import type { NextConfig } from "next"; +const BACKEND_URL = process.env.BACKEND_URL || "http://localhost:4000"; + const nextConfig: NextConfig = { async rewrites() { return [ { source: "/api/:path*", - destination: "http://localhost:4000/api/:path*", + destination: `${BACKEND_URL}/api/:path*`, }, ]; },