Elixir Configuration & Environment variables

Elixir configuration is divided into compile-time (config.exs, dev.exs, prod.exs, test.exs) and runtime (runtime.exs) phases, where compile-time configurations are merged sequentially based on environment and cannot be changed after build, while runtime.exs allows dynamic configuration via environment variables before application startup. The configuration system originates from Erlang OTP and uses functions like Application.compile_env and Application.get_env to access values, with developers choosing between declaring configs directly in mix.exs or using the recommended separate config files approach.

Visit Original Article →

⌘K

Start typing to search...

Search across content, newsletters, and subscribers