Security & Best Practices
Environment Variables
What It Is
Configuration values stored outside your code, different per environment
Analogy
Settings you adjust depending on location — your home thermostat vs. the office
Try It Out
🛠️Development
http://localhost:3000Local development with test data
Environment Variables
DATABASE_URL="postgresql://localhost:5432/dev_db"API_KEY="test_key_123"DEBUG="true"LOG_LEVEL="debug"
🛠️
Local Development
Your local machine. Safe to experiment and break things.
Related Terms in Security & Best Practices
Secrets
The combination to your safe — share it and you lose everything
Leaking Secrets
Leaving the safe combination on a sticky note in a public place
Token
A wristband at a concert — proves you paid without showing your credit card every time
OAuth
Using your driver's license to prove your age instead of showing your birth certificate