Dotenv is a zero-dependency module that loads environment variables from a .env file into process.env . Storing configuration in the environment separate from code is based on The Twelve-Factor App methodology. Never store any secrets in your React App, meaning that environment variables are embbed into React App and anyone can view them.

2m read timeFrom towardsdev.com
Post cover image
Table of contents
Using Environment Variables in React AppWhat is Environment Variable?FormatBackground StoryTypesAdding Environment VariablesReading Environment VariablesEmbedding Environment VariablesTipsReferencesUntil the next time
2 Comments