added frontend env file for non-docker stuf

This commit is contained in:
Elijah Lucian 2021-07-15 16:19:16 -06:00
parent 3f9b05b1dd
commit 99ed535e3e
3 changed files with 5 additions and 1 deletions

1
frontend/.env Normal file
View File

@ -0,0 +1 @@
REACT_APP_API_URL=

View File

@ -2,6 +2,7 @@
"name": "frontend",
"version": "0.1.0",
"private": true,
"proxy": "http://localhost:8000",
"dependencies": {
"@dank-inc/data-buddy": "^0.2.0",
"@testing-library/react": "^11.1.0",

View File

@ -6,9 +6,11 @@ import { AppContextProvider } from './contexts/AppContext'
import './app.scss'
const App = () => {
const baseURL = process.env.REACT_APP_API_URL || '/api'
return (
<BrowserRouter>
<AppContextProvider baseURL="/api">
<AppContextProvider baseURL={baseURL}>
<UserContextProvider>
<CoreLayout />
</UserContextProvider>