dotenv_gleam

Functions

pub fn config() -> Nil

Tries to load environment variables from a .env file in the current working directory. this function calls for assert to make sure that the file is read. if for some reason the file is not there will crash the program.

Examples

> config()
> os.get_env("TEST")
"test"
pub fn config_with(file: String) -> Nil

Tries to load environment variables from a file specified in the current working directory. this function calls for assert to make sure that the file is read. if for some reason the file is not there will crash the program.

Examples

> config_with("path/to/.env")
> os.get_env("TEST")
"test"
Search Document