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:
@@ -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([]);
|
||||
|
||||
Reference in New Issue
Block a user