pub fn try_from_filename<P: AsRef<Path>>(filename: P) -> Result<Dotenv>
Expand description

Create a Dotenv instance from the given filename

Examples

let envs = dotenv::try_from_filename(".env.local").unwrap();

for (key, value) in envs.flatten() {
  println!("{}={}", key, value);
}