Codecademy Logo

Secure Collaborative Development

Environment Variables

Environment variables are used to store information we want to reference in a program. They are a key-value pair whose value is set and stored outside a program in a .env file. Environment variables can prevent the secret development keys and passwords from getting out and reward us with more efficient code.

DB_HOST=123.45.678.90 DB_USER=root DB_PASS=123456 API_KEY=V3rYPubl1cK3y