glenvy/dotenv

Support for .env files.

Types

An error that occurred while reading a .env file.

pub type Error {
  Io(simplifile.FileError)
}

Constructors

  • Io(simplifile.FileError)

    An IO error.

Functions

pub fn load() -> Result(Nil, Error)

Loads the .env file.

pub fn load_from(path filepath: String) -> Result(Nil, Error)

Loads the file at the specified path as a .env file.

pub fn read_from(
  path filepath: String,
) -> Result(Dict(String, String), Error)

Reads the environment variables from the specified .env file.

Search Document