From f722aec648427e9cf25a5c6eef103360769f8c40 Mon Sep 17 00:00:00 2001 From: Cameron Clough Date: Mon, 21 Mar 2022 23:40:12 +0000 Subject: [PATCH] fix env/config names --- .env.development | 3 ++- .env.production | 4 ++-- src/config.js | 6 ++++-- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.env.development b/.env.development index 4d321d2..6c82272 100644 --- a/.env.development +++ b/.env.development @@ -1,3 +1,4 @@ -API_URL=http://localhost:8080 +REACT_APP_PUBLIC_URL=http://localhost:3000 +REACT_APP_API_URL=http://localhost:8080 REACT_APP_WEBSITE_NAME="RetroPilot Connect - Development" diff --git a/.env.production b/.env.production index aec8c58..9dd651e 100644 --- a/.env.production +++ b/.env.production @@ -1,4 +1,4 @@ -PUBLIC_URL=https://connect.retropilot.org -API_URL=https://api.retropilot.org +REACT_APP_PUBLIC_URL=https://connect.retropilot.org +REACT_APP_API_URL=https://api.retropilot.org REACT_APP_WEBSITE_NAME="RetroPilot Connect" diff --git a/src/config.js b/src/config.js index 487e1a7..7e1b0c2 100644 --- a/src/config.js +++ b/src/config.js @@ -2,12 +2,12 @@ const config = { /** * The address at which the website is hosted. */ - publicUrl: process.env.PUBLIC_URL, + publicUrl: process.env.REACT_APP_PUBLIC_URL, /** * The address at which the API is accessible. */ - apiUrl: process.env.API_URL, + apiUrl: process.env.REACT_APP_API_URL, /** * The name displayed in the website title. @@ -15,4 +15,6 @@ const config = { websiteName: process.env.REACT_APP_WEBSITE_NAME, }; +console.log({ config }); + export default config;