Hi,
Well It depends on the generation time of the config.
- If you can define the config options at compile time , you can put them in
config.exsof the final application usingconfig :x, key: value[to set] andApplication.get_env(:x, :key)[to fetch]. See also the remark at the and -
if the config state is only known at startup time you could use [EDIT: See following replyApplication.start/2] (http://elixir-lang.org/docs/stable/elixir/Application.html#module-application-module-callback) and start the application usingSupervisor. - If You need runtime config, or multiple applications using
Xwith startup time config then creating anAgentis the way to go
See also this question for a related problem I had a while ago, regarding the non-usability of config.exs from dependent packages.






















