envoy
A zero dependency cross platform Gleam package for reading environment variables.
gleam add envoy
import envoy
pub fn main() {
// Get an environment variable
envoy.get("PORT")
// Set an environment variable
envoy.set("PORT", "8080")
// Unset an environment variable
envoy.unset("PORT")
// Get all environment variables
envoy.all()
}
That’s pretty much it, but documentation can be found at https://hexdocs.pm/envoy.
(OK I lied, it has one dep. The standard library so we can use Dict
for all
).