Introduction
A .env file holds settings that a program loads as environment variables.
The notes here follow dotenv, a loader for Node.js; this page does not
claim that other loaders read the same rules.
Structure
Each variable is on its own line as KEY=value. Empty lines are skipped and
# starts a comment, so a value containing it must be quoted. Single, double
and backtick quotes are accepted; dotenv trims unquoted values, expands
\n inside double quotes and, from version 15, allows a quoted value to run
over several lines.
Not described
This page is a first outline.
Known, not yet covered
- Reference: the exact grammar of dotenv and the rules of other loaders.
- Viewer: the site has no viewer for this format.
Links
Developers
- dotenv – loads .env files in Node.js (JavaScript)