create-react-app local and dev environment variables

Viewed 5745

I have .env.local with

REACT_APP_BACKEND_BASEURL=http://localhost:8080/

and .env.development with

REACT_APP_BACKEND_BASEURL=http://deployedserverurl:8080/

how do I select the correct env file on start? As it is now, it prefers the dev env file over the local.

npm start --env=local doesnt seem to work, am I missing something?

1 Answers
Related