dotenv config
parent
0e6b7c7d3a
commit
06c7cd01b3
|
@ -0,0 +1,4 @@
|
||||||
|
PUBLIC_URL=http://localhost:3000
|
||||||
|
API_URL=http://localhost:8080
|
||||||
|
|
||||||
|
REACT_APP_WEBSITE_NAME="RetroPilot Connect - Development"
|
|
@ -0,0 +1,4 @@
|
||||||
|
PUBLIC_URL=https://connect.retropilot.org
|
||||||
|
API_URL=https://api.retropilot.org
|
||||||
|
|
||||||
|
REACT_APP_WEBSITE_NAME="RetroPilot Connect"
|
|
@ -3,3 +3,7 @@ React client for Retropilot
|
||||||
|
|
||||||
|
|
||||||
Ties into https://github.com/retropilot/retropilot-server/ to provide a react frontend
|
Ties into https://github.com/retropilot/retropilot-server/ to provide a react frontend
|
||||||
|
|
||||||
|
To override the environment variables, create a `.env.local` file. You can also override the
|
||||||
|
variables for development, testing and production independently (`.env.development`,
|
||||||
|
`.env.test.local` and `.env.production.local` files).
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
work correctly both with client-side routing and a non-root public URL.
|
work correctly both with client-side routing and a non-root public URL.
|
||||||
Learn how to configure a non-root public URL by running `npm run build`.
|
Learn how to configure a non-root public URL by running `npm run build`.
|
||||||
-->
|
-->
|
||||||
<title>RetroPilot Client</title>
|
<title>%REACT_APP_WEBSITE_NAME%</title>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<noscript>You need to enable JavaScript to run this app.</noscript>
|
<noscript>You need to enable JavaScript to run this app.</noscript>
|
||||||
|
|
|
@ -0,0 +1,18 @@
|
||||||
|
const config = {
|
||||||
|
/**
|
||||||
|
* The address at which the website is hosted.
|
||||||
|
*/
|
||||||
|
publicUrl: process.env.PUBLIC_URL,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The address at which the API is accessible.
|
||||||
|
*/
|
||||||
|
apiUrl: process.env.API_URL,
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The name displayed in the website title.
|
||||||
|
*/
|
||||||
|
websiteName: process.env.REACT_APP_WEBSITE_NAME,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default config;
|
Loading…
Reference in New Issue