From 87b052e1172a8075936beda44d6f635503d81408 Mon Sep 17 00:00:00 2001 From: Chris Anderson Date: Wed, 21 Jun 2023 21:04:03 -0500 Subject: [PATCH] Adjusts what gets set as default env values (#195) --- .env.example | 3 +-- apps/ui/src/config/env.ts | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.env.example b/.env.example index 2f4185c5..17a5d677 100644 --- a/.env.example +++ b/.env.example @@ -1,7 +1,6 @@ APP_SECRET=Ck7Rt1uiy5WGbrTFj1HBjymbBoA6zqih -BASE_URL=http://localhost:3000 +BASE_URL=/ UI_PORT=3000 -API_BASE_URL=http://localhost:3000/api DB_CLIENT=mysql2 DB_HOST=mysql diff --git a/apps/ui/src/config/env.ts b/apps/ui/src/config/env.ts index d72c6021..bf6e7329 100644 --- a/apps/ui/src/config/env.ts +++ b/apps/ui/src/config/env.ts @@ -4,6 +4,7 @@ declare global { export const env = { api: { - baseURL: window.API_BASE_URL ?? process.env.REACT_APP_API_BASE_URL ?? '/api', + baseURL: window.API_BASE_URL + || (process.env.REACT_APP_API_BASE_URL ?? '/api'), }, }