diff --git a/webapp/.env b/webapp/.env index 944580c1..5f032cf6 100644 --- a/webapp/.env +++ b/webapp/.env @@ -1,2 +1,2 @@ REACT_APP_API_ENDPOINT=http://localhost:8000 -REACT_APIS_ENDPOINT=http://localhost:8100 \ No newline at end of file +REACT_APP_APIS_ENDPOINT=http://localhost:8100 \ No newline at end of file diff --git a/webapp/Dockerfile b/webapp/Dockerfile index 84a78796..28b036d8 100644 --- a/webapp/Dockerfile +++ b/webapp/Dockerfile @@ -10,7 +10,7 @@ ARG API_URI1="http://localhost:8000" ENV REACT_APP_API_ENDPOINT=$API_URI1 ARG API_URI2="http://localhost:8100" -ENV REACT_APIS_ENDPOINT=$API_URI2 +ENV REACT_APP_APIS_ENDPOINT=$API_URI2 #Create an optimized version of the webapp RUN npm run build diff --git a/webapp/src/storeQuestion/App.jsx b/webapp/src/storeQuestion/App.jsx index 99f545c0..b169d549 100644 --- a/webapp/src/storeQuestion/App.jsx +++ b/webapp/src/storeQuestion/App.jsx @@ -11,7 +11,7 @@ function App() { const [currentPage, setCurrentPage] = useState(1); const itemsPerPage = 10; // Número de preguntas por página - const apiEndpoint = process.env.REACT_APIS_ENDPOINT || 'http://localhost:8100'; + const apiEndpoint = process.env.REACT_APP_APIS_ENDPOINT || 'http://localhost:8100'; useEffect(() => { const obtenerPreguntas = async () => { diff --git a/webapp/src/usersRanking/App.jsx b/webapp/src/usersRanking/App.jsx index 309e4045..8c838671 100644 --- a/webapp/src/usersRanking/App.jsx +++ b/webapp/src/usersRanking/App.jsx @@ -11,7 +11,8 @@ function App() { const [currentPage, setCurrentPage] = useState(1); const itemsPerPage = 10; // Número de usuarios por página - const apiEndpoint = process.env.REACT_APIS_ENDPOINT || 'http://localhost:8100'; + const apiEndpoint = process.env.REACT_APP_APIS_ENDPOINT || 'http://localhost:8100'; + console.log(process.env.REACT_APP_APIS_ENDPOINT) useEffect(() => { const obtenerUsuarios = async () => {