The :env
must not be specified in project
but inside the application one.
def application do
[ applications: [],
mod: { Basic, [] },
env: [foo: :bar] ]
end
Then you can access it as:
Application.get_env(:basic, :foo)
In this case, there is no support for specifying the environment for a particular MIX_ENV (like dev or prod). This is exactly why :env
inside project
is deprecated. Having two keys being named :env
with different behaviour is recipe for confusion. :)