Fix: REACT_APP_BACKEND_URL environment variable issue in frontend in Updated UI.

Revised the BACKEND_URL constant to ensure the application prioritizes fetching the backend URL from the environment variable REACT_APP_BACKEND_URL before defaulting to `http://localhost:7777`.
This commit is contained in:
Tanvir Ahamed
2025-06-18 00:13:05 +06:00
committed by GitHub
parent 7439ea35c7
commit ae7be9ca8d
+2 -2
View File
@@ -6,10 +6,10 @@ import { ThemeToggle } from "./components/ThemeToggle";
import { ResizableLayout } from "./components/ResizableLayout";
import faviconPng from "./logo.png";
const BACKEND_URL =
"http://localhost:7777" || process.env.REACT_APP_BACKEND_URL;
const BACKEND_URL = process.env.REACT_APP_BACKEND_URL || 'http://localhost:7777';
console.log("Using backend URL:", BACKEND_URL);
function App() {
const [query, setQuery] = useState("");
const [messages, setMessages] = useState([]);