Envvar
A simple environment variable parser for Elixir that actually works unlike the intended one
Usage
-
Add
torequire.Envvar Envvar.load()config/runtime.exsfirst require Envvarto import the libraryEnvvar.load()loads .env from the root directory automaticallyEnvvar.load("/path/to/file")loads .env from the required locationSystem.get_env("NAME_OF_ENV_VAR")to use the variable in your program.
Installation
If available in Hex, the package can be installed
by adding envvar to your list of dependencies in mix.exs:
def deps do
[
{:envvar, "~> 0.1.0"}
]
endDocumentation can be generated with ExDoc and published on HexDocs. Once published, the docs can be found at https://hexdocs.pm/envvar.