ConfigValues

Standardizes configuration values so that you can use system variables etc.

Example

config :my_app, SomeModule,
  some_value: {:system, "VARIABLE_NAME"},
  other_value: "normal_value"

In your library or code, when loading values from config pass them through config values. The following are replaced with their values:


# Assume that there is a system variable in "VARIABLE_NAME" of "BOB"
my_config = Application.get_env(:my_app, SomeModule)

[
  some_value: "BOB",
  other_value: "normal_value",
]

Installation

If available in Hex, the package can be installed as:

  1. Add config_values to your list of dependencies in mix.exs:

    def deps do

     [{:config_values, "~> 0.0.1"}]

    end

  2. Ensure config_values is started before your application:

    def application do

     [applications: [:config_values]]

    end