For being able to run the backend, and frontend application on the same machine (locally) a proxy has been set in the project!
If you <ins>don't want to run</ins> the backend server, and frontend on the same machine, or have different settings, please adjust the `package.json` at the following line:
`"proxy": "http://localhost:8080"`
### Environment Variables
Environment variables are stored in `.env` files.
Precedency of environment variable files are (files on the left have more priority than files on the right):
* npm run build: `.env.production.local`, `.env.local`, `.env.production`, `.env`
* npm test: `.env.test.local`, `.env.test`, `.env` (note .env.local is missing)
All environment variables start with `REACT_APP_` prefix.
| Environment variable | Description |
| -------------------------|-------------|
| SERVER_ADDRESS | The backend server base URL _(host:port)_ (if backend server is running natively on the same host as the UI then the value has to be empty, and proxy has to be set!)|
| API_BASE_ENDPOINT | The context path of the application's REST API _(e.g. /ccce-api)_ |
| TOKEN_RENEW_INTERVAL | Time interval to renew JWT auth token _(in milliseconds)_ |
## Useful links to start developing in ReactJS
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).
...
@@ -47,24 +84,24 @@ To learn React, check out the [React documentation](https://reactjs.org/).
...
@@ -47,24 +84,24 @@ To learn React, check out the [React documentation](https://reactjs.org/).
### Code Splitting
### Code Splitting
This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting)
This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size)
This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app)
This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration)
This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment)
This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify)