/runtime-provider

Primary LanguageElixirMIT LicenseMIT

RuntimeProvider

This is an experimental project based on ConfigProvider.

If you need stability, I recommend another project - Vapor .

The first stage only supports YAML files, more files and system ENV may be supported in the future.

Installation

def deps do
  [
    {:runtime_provider, "~> 0.1.0"}
  ]
end

Usage

  1. Define provider module with definitions. An example of how to define a configuration is in ThisTestFile
defmodule Provider do
  use RuntimeProvider

  # define some configurations
end
  1. In mix.exs
def project do
  releases: [
    demo: [
      config_providers: [
        {SelfProvider, {:system, "RELEASE_ROOT", "/extra_config.exs"}}
      ]
    ]
  ]
end
  1. mix release