Exenv.Adapters.Dotenv (Exenv v0.4.1) View Source
Loads env vars from .env
files.
Below is a simple example of a .env
file:
KEY1=val
KEY2=val
KEY3=val
Assuming we have the above file in our project root directory, we would be able to access any of the above env vars.
System.get_env("KEY1")
By default, this adapter is set to start automatically on Exenv
startup. It
also has support for encrypted .env
files.
Link to this section Summary
Functions
Loads the system env vars from a .env
specified in the options.
Link to this section Functions
Loads the system env vars from a .env
specified in the options.
Options
:file
- The file path or mfa that evaluates to a file path in which to read the.env
from. By default this is a.env
file in your projects root directory.:encryption
- Options used to decrypt files. Please seeExenv.read_file/2
for the options available.