added frontend env file for non-docker stuf
This commit is contained in:
parent
3f9b05b1dd
commit
99ed535e3e
1
frontend/.env
Normal file
1
frontend/.env
Normal file
|
@ -0,0 +1 @@
|
||||||
|
REACT_APP_API_URL=
|
|
@ -2,6 +2,7 @@
|
||||||
"name": "frontend",
|
"name": "frontend",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"proxy": "http://localhost:8000",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@dank-inc/data-buddy": "^0.2.0",
|
"@dank-inc/data-buddy": "^0.2.0",
|
||||||
"@testing-library/react": "^11.1.0",
|
"@testing-library/react": "^11.1.0",
|
||||||
|
|
|
@ -6,9 +6,11 @@ import { AppContextProvider } from './contexts/AppContext'
|
||||||
import './app.scss'
|
import './app.scss'
|
||||||
|
|
||||||
const App = () => {
|
const App = () => {
|
||||||
|
const baseURL = process.env.REACT_APP_API_URL || '/api'
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BrowserRouter>
|
<BrowserRouter>
|
||||||
<AppContextProvider baseURL="/api">
|
<AppContextProvider baseURL={baseURL}>
|
||||||
<UserContextProvider>
|
<UserContextProvider>
|
||||||
<CoreLayout />
|
<CoreLayout />
|
||||||
</UserContextProvider>
|
</UserContextProvider>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user