Skip to content

Commit

Permalink
Fetch backend url from environment variable
Browse files Browse the repository at this point in the history
  • Loading branch information
wildjames committed Nov 24, 2024
1 parent 009659b commit 2a5abc9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ services:
ports:
- "80:80"
environment:
DJANGO_BACKEND_URL: "http://localhost:8000"

DJANGO_DB_NAME: todoqueue
DJANGO_DB_USER: todo_user
DJANGO_DB_PASSWORD: todo_password
Expand Down
5 changes: 4 additions & 1 deletion todoqueue_frontend/src/api/backend_url.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
// export const backend_url = "http://localhost:8000";
export const backend_url = ""; // For production
// export const backend_url = ""; // For production

// Get from environment variable
export const backend_url = process.env.REACT_APP_BACKEND_URL;

0 comments on commit 2a5abc9

Please sign in to comment.