Skip to content

Commit b2e594c

Browse files
fix: correct env var names so react can read them
1 parent 140d1cf commit b2e594c

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

crossbar_llm/backend/main.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
origins = [
2929
"http://localhost:8501", # React app running on localhost
3030
"http://127.0.0.1:8501",
31-
f"https://crossbarv2.hubiodatalab.com{os.getenv('CROSSBAR_LLM_ROOT_PATH')}",
31+
f"https://crossbarv2.hubiodatalab.com{os.getenv('REACT_APP_CROSSBAR_LLM_ROOT_PATH')}",
3232
]
3333

3434
app = FastAPI()

crossbar_llm/frontend/src/services/api.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import axios from 'axios';
22
import Cookies from 'js-cookie';
33

4-
const CROSSBAR_LLM_ROOT_PATH = process.env.REACT_APP_CROSSBAR_LLM_ROOT_PATH || '/llm';
4+
const REACT_APP_CROSSBAR_LLM_ROOT_PATH = process.env.REACT_APP_CROSSBAR_LLM_ROOT_PATH || '/llm';
55

66
const instance = axios.create({
7-
baseURL: `https://crossbarv2.hubiodatalab.com${CROSSBAR_LLM_ROOT_PATH}/api`, // Backend URL
7+
baseURL: `https://crossbarv2.hubiodatalab.com${REACT_APP_CROSSBAR_LLM_ROOT_PATH}/api`, // Backend URL
88
withCredentials: true, // Allow credentials (cookies) to be sent
99
headers: {
1010
'Content-Type': 'application/json',

startup.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# Run backend
44
cd crossbar_llm/backend
5-
uvicorn main:app --host 0.0.0.0 --port 8000 --root-path "$CROSSBAR_LLM_ROOT_PATH/api" &
5+
uvicorn main:app --host 0.0.0.0 --port 8000 --root-path "$REACT_APP_CROSSBAR_LLM_ROOT_PATH/api" &
66

77
# Run frontend
88
cd ../..

0 commit comments

Comments
 (0)