pub fn load_path<P: AsRef<Path>>(path: P) -> Result<()>
Expand description

Load file at the given path and then set environment variables.

Examples

use std::env;

let my_path = env::home_dir().map(|dir| dir.join(".env")).unwrap();
dotenv::load_path(my_path.as_path()).ok();