From 1a53bacfcea30dfcba25226bceac49aabe3a9574 Mon Sep 17 00:00:00 2001 From: Martin Berka Date: Tue, 13 Jun 2023 21:12:21 +0200 Subject: [PATCH] =?UTF-8?q?Podpora=20v=C3=BDvoje=20na=20Windows?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- client/.env.template | 2 +- client/src/Utils.tsx | 2 +- server/.env.template | 2 +- server/src/restaurants.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/client/.env.template b/client/.env.template index 7b6a1c1..61ffc66 100644 --- a/client/.env.template +++ b/client/.env.template @@ -1,3 +1,3 @@ # Veřejná URL, na které bude dostupný klient (typicky přes proxy). -# Pro vývoj není potřeba, bude použita výchozí hodnota http://localhost:3001 +# Pro vývoj není potřeba, bude použita výchozí hodnota http://127.0.0.1:3001 # PUBLIC_URL=http://example:3001 \ No newline at end of file diff --git a/client/src/Utils.tsx b/client/src/Utils.tsx index 7eb1fa8..a019057 100644 --- a/client/src/Utils.tsx +++ b/client/src/Utils.tsx @@ -7,7 +7,7 @@ export const getBaseUrl = (): string => { if (process.env.PUBLIC_URL) { return process.env.PUBLIC_URL; } - return 'http://localhost:3001'; + return 'http://127.0.0.1:3001'; } const LOGIN_KEY = "login"; diff --git a/server/.env.template b/server/.env.template index 82489f9..0c4ec00 100644 --- a/server/.env.template +++ b/server/.env.template @@ -1,5 +1,5 @@ # URL na kterém je dostupný Food API parser. -# Pro vývoj není potřeba, bude použita výchozí hodnota http://localhost:3002 +# Pro vývoj není potřeba, bude použita výchozí hodnota http://127.0.0.1:3002 # FOOD_API_URL=http://nginx/api/food # Zapne režim mockování jídelních lístků. diff --git a/server/src/restaurants.ts b/server/src/restaurants.ts index 42b3ae3..8ea040c 100644 --- a/server/src/restaurants.ts +++ b/server/src/restaurants.ts @@ -1,7 +1,7 @@ import axios from "axios"; // URL na Food API - získání jídelních lístků restaurací -const foodUrl = process.env.FOOD_API_URL || 'http://localhost:3002'; +const foodUrl = process.env.FOOD_API_URL || 'http://127.0.0.1:3002'; export const fetchMenus = async () => { try {