fromFile

fun fromFile(path: String = ".env", optional: Boolean = true): DotEnvSource(source)

Reads a .env file. A missing file gives an empty source unless optional is false, since a local .env usually exists only on developer machines.