From 66d34099ba159e54a540fe7ebbdfb93efea27cd7 Mon Sep 17 00:00:00 2001 From: lavanyagarg112 Date: Thu, 10 Jul 2025 21:53:06 +0800 Subject: [PATCH 1/3] Update config --- next.config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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*`, }, ]; }, From 8395bb2c289dc3452b29753907b6674f9f052d1d Mon Sep 17 00:00:00 2001 From: lavanyagarg112 Date: Thu, 10 Jul 2025 21:53:40 +0800 Subject: [PATCH 2/3] Update config --- next.config.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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*`, }, ]; }, From c094f0a3363f946076f71ae9d22e24bf04bda159 Mon Sep 17 00:00:00 2001 From: Lavanya Garg Date: Thu, 10 Jul 2025 21:55:42 +0800 Subject: [PATCH 3/3] Revert "Update config" --- next.config.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/next.config.ts b/next.config.ts index 78841fb..dedb731 100644 --- a/next.config.ts +++ b/next.config.ts @@ -1,13 +1,11 @@ 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: `${BACKEND_URL}/api/:path*`, + destination: "http://localhost:4000/api/:path*", }, ]; },