From e0627461dddff34c74a8eb3d7a6ff04efad8bdaf Mon Sep 17 00:00:00 2001 From: CANCI0 Date: Tue, 2 Apr 2024 21:05:57 +0200 Subject: [PATCH] Agregado REACT_APP_API_ENDPOINT a .env y Login.js --- .env | 1 + docker-compose.yml | 2 +- webapp/src/components/Login/Login.js | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.env b/.env index 6f8c3d58..410fcb6d 100644 --- a/.env +++ b/.env @@ -1,4 +1,5 @@ teamname="wiq_es1a" +REACT_APP_API_ENDPOINT=http://localhost:8000 AUTH_SERVICE_URL=http://localhost:8002 USER_SERVICE_URL=http://localhost:8001 QUESTION_SERVICE_URL=http://localhost:8003 diff --git a/docker-compose.yml b/docker-compose.yml index ad1a4ff7..58958ad1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -94,7 +94,7 @@ services: ports: - "3000:3000" environment: - GATEWAY_SERVICE_URL: http://gatewayservice:8000 + REACT_APP_API_ENDPOINT: http://gatewayservice:8000 prometheus: image: prom/prometheus diff --git a/webapp/src/components/Login/Login.js b/webapp/src/components/Login/Login.js index e846871c..0e2c2c91 100644 --- a/webapp/src/components/Login/Login.js +++ b/webapp/src/components/Login/Login.js @@ -30,6 +30,7 @@ const Login = () => { const apiEndpoint = process.env.REACT_APP_API_ENDPOINT || "http://localhost:8000"; + console.log(process.env.REACT_APP_API_ENDPOINT); const loginUser = () => { axios