Read and improve the documentation in the docs
folder
- Prerequisity: have Node.js and yarn installed
- Clone this repository
- Go to working directory:
cd bis-frontend
- Install dependencies:
yarn
- Run development version:
REACT_APP_API_BASE_URL="https://bis.proxy.mrkvon.org/https://dev.bis.lomic.cz/api/" REACT_APP_CORS_PROXY="https://bis.proxy.mrkvon.org/" yarn start
- Prerequisity: have Node.js and yarn installed
- Clone this repository
- Go to working directory:
cd bis-frontend
- Install dependencies:
yarn
- Build production version (make sure to setup or omit variables as you need):
REACT_APP_API_BASE_URL="https://bis.proxy.mrkvon.org/https://dev.bis.lomic.cz/api/" REACT_APP_CORS_PROXY="https://bis.proxy.mrkvon.org/" yarn build
- A
build/
folder should have been created in the root of your project. Copy the files frombuild/
to your production server, and serve as single page application for example with nginx.
Configuration is done with environment variables. These variables should never contain secrets. After build, they'll be hardcoded in build files and therefore easily discoverable. They serve exclusively to set up configuration constants
To run the app in development version
REACT_APP_VAR1="something" REACT_APP_VAR2="something_else" yarn start
To build the app
REACT_APP_VAR1="something" REACT_APP_VAR2="something_else" yarn build
REACT_APP_API_BASE_URL
API base url, including trailing slash (default/api/
)REACT_APP_SENTRY_DSN
a dsn for Sentry setup (disabled when none)REACT_APP_CORS_PROXY
A proxy which adds CORS headers to images, including trailing slash (default none)REACT_APP_MAP_TILE_SERVER
url template of map tiles
REACT_APP_API_BASE_URL="https://bis.proxy.mrkvon.org/https://dev.bis.lomic.cz/api/" REACT_APP_CORS_PROXY="https://bis.proxy.mrkvon.org/" yarn start
In a new terminal run:
git clone https://github.com/mrkvon/rdf-proxy.git
cd rdf-proxy
git switch cors-anywhere
yarn
yarn proxy
And the proxy will run on http://localhost:8080
and you can do http://localhost:8080/https://example.com/whatever
Use the command: REACT_APP_API_BASE_URL="http://localhost:8080/https://dev.bis.lomic.cz/api/" REACT_APP_CORS_PROXY="http://localhost:8080/" yarn start
yarn analyze
https://create-react-app.dev/docs/analyzing-the-bundle-size/