Optional
envOptional
expandA boolean value indicating the use of expanded variables. If .env contains expanded variables, they'll only be parsed if this property is set to true.
Internally, dotenv-expand is used to expand variables.
Optional
ignoreIf "true", environment files (.env
) will be ignored.
Optional
ignoreIf "true", predefined environment variables will not be validated.
Optional
keyIf set, this function will transform all environment variable keys prior to parsing.
Be aware: If you transform multiple keys to the same value only one will remain!
environment variable key
.env file: `PORT=8080` and `keyTransformer: key => key.toLowerCase()` results in `{"port": 8080}`
Optional
separatorIf set, use the separator to parse environment variables to objects.
app__port=8080
db__host=127.0.0.1
db__port=3000
if separator
is set to __
, environment variables above will be parsed as:
{
"app": {
"port": 8080
},
"db": {
"host": "127.0.0.1",
"port": 3000
}
}
Generated using TypeDoc
Path to the environment file(s) to be loaded.