pub fn from_filename<P: AsRef<Path>>(filename: P) -> Result<PathBuf>
Expand description

Loads environment variables from the specified file.

Examples

dotenvy::from_filename("custom.env").unwrap();

It is also possible to load from a typical .env file like so. However, using dotenv is preferred.

dotenvy::from_filename(".env").unwrap();