View Source Runlet.Config (runlet v1.2.3)
This module handles fetching values from the config with some additional niceties
Link to this section Summary
Functions
Fetches a value from the config, or from the environment if {:system, "VAR"} is provided.
Link to this section Functions
Fetches a value from the config, or from the environment if {:system, "VAR"} is provided.
An optional default value can be provided if desired.
example
Example
iex> Application.put_env(:myapp, :test_var2, 1)
...> 1 = Elixir.Runlet.Config.get(:myapp, :test_var2)
1
iex> :default = Elixir.Runlet.Config.get(:myapp, :missing_var, :default)
:default