Skip to content
4 changes: 3 additions & 1 deletion next.config.ts
Original file line number Diff line number Diff line change
@@ -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*`,
},
];
},
Expand Down