

Hasty Treat - Environmental Variables
Mar 15, 2021
Explore the crucial role of environment variables in web development! Discover what they are, including API keys and database URLs. Learn about different types, such as plain text and encrypted options. Tune in for practical tips on managing these variables securely, and find out where to store them effectively. The hosts dive into personal experiences and address common pitfalls, including limitations on platforms like Netlify. Get ready to boost your coding fluency and keep your sensitive data safe!
AI Snips
Chapters
Transcript
Episode notes
Using Environment Variables
- Store sensitive data like API keys, database URLs, and secrets as environment variables.
- Access them via
process.env
in Node.js and other languages.
Managing .env Files
- Use
.env
files to store environment variables locally for development. - Never commit
.env
files to public GitHub repositories; use hosting platform UIs for sensitive information.
Accidental Commit Story
- Wes accidentally committed a
.env
file with sample values to GitHub and received an immediate warning. - He also received a warning from Google about a student's project using an old Google Maps API key, highlighting the speed of these checks.