Encyclopedia / Backend
Environment variables & secrets
Configuration and keys kept outside the code.
API keys, database URLs and tokens live in the host's settings, not in the repository. Anything bundled into front-end JavaScript is public. If a key appears in the browser's network tab, anyone can use it.
# .env (never committed)
DATABASE_URL=postgres://…
RESEND_API_KEY=re_…
Related terms
More in Backend
Code and data that run on a server instead of in the visitor's browser.