FullFact / health-misinfo-shared

Raphael health misinformation project, shared by Full Fact and Google
MIT License
0 stars 0 forks source link

feat: read baseUrl from an environment variable #43

Closed andylolz closed 3 months ago

andylolz commented 3 months ago

Fixes #40.

You can use this by starting the development server with:

REACT_APP_BASE_URL=http://localhost:3000/api npm run start

…or with a .env file.


Pull request checklist

andylolz commented 3 months ago

Adding Simon here too, because I don’t know if this is the preferred way to do this in React.

I got this approach from here: https://create-react-app.dev/docs/adding-custom-environment-variables/