Customizing environment variables in React

Suman Kunwar
Jan 31 · 4 min read


Creating an application

npx create-react-app my-app
cd my-app
npm start
Image result for create-react-app
echo "BASE_URL='http://localhost:7000'" >> .env

Bonus Points

Can we make it simpler?

Suman Kunwar

Written by

Javascript & Open Source Enthusiast, Adventure Lover

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade