|
149 | 149 |
|
150 | 150 | Follow the instructions in the `.env` file to connect it to the Harmony API - you can connect either to the remote API, or to a local API. |
151 | 151 |
|
| 152 | +For example, if you are already running the API locally, set `.env` and `.env.development` to: |
| 153 | + |
| 154 | +``` |
| 155 | +REACT_APP_API_URL=http://localhost:8000 |
| 156 | +REACT_APP_API_EXAMPLES=$REACT_APP_API_URL/text/examples |
| 157 | +REACT_APP_API_PARSE=$REACT_APP_API_URL/text/parse |
| 158 | +REACT_APP_API_MATCH=$REACT_APP_API_URL/text/match |
| 159 | +REACT_APP_API_VERSION=$REACT_APP_API_URL/info/version |
| 160 | +REACT_APP_API_MODELS=$REACT_APP_API_URL/info/list-models |
| 161 | +REACT_APP_ABSOLUTE_URL_PREFIX=http://localhost |
| 162 | +``` |
| 163 | + |
| 164 | +Here is a video on how you can install and run both the back end and front end locally on your machine: |
| 165 | + |
| 166 | +{{< youtube 1xp3Uh6dptg >}} |
| 167 | + |
152 | 168 | #### Working on Harmony R |
153 | 169 |
|
154 | 170 | Clone the [R repository](https://github.com/harmonydata/harmony_r): |
@@ -291,6 +307,13 @@ After you have cloned the repository at https://github.com/harmonydata/harmonyap |
291 | 307 | git clone --recurse-submodules https://github.com/harmonydata/harmonyapi.git |
292 | 308 | ``` |
293 | 309 |
|
| 310 | +#### Troubleshooting the front end repository after git clone |
| 311 | + |
| 312 | +After you clone the front end, if you want the front end to communicate with your local copy of the API, you need to update `.env` and `.env.development` as described in the section on [Working on Harmony front end](#working-on-harmony-front-end). |
| 313 | + |
| 314 | +If you see an error such as the below, check that your `.env` and `.env.development` are correct. You can also check if it runs connecting to the remote API. |
| 315 | + |
| 316 | +{{< image src="/images/fe-uncaught-runtime-error.png" title="Harmony repos" >}} |
294 | 317 |
|
295 | 318 |
|
296 | 319 | ## Additional Resources |
|
0 commit comments