Hi, following this guide https://phxroad.com/phoenix/environment-variables-in-phoenix but running into headwind as usual.
I’ve changed out
use Mix.Config to
import Config in all my config files
I’ve created a
dev.secret.exs file and added it to
import_config "dev.secret.exs at the bottom of
I’m trying to use a single api key to an external service. Very simple.
Here’s the code of
api_key: “the key”
Firstly, I don’t know what rules govern the atoms used in this config statement. Would like to read some guidance on those.
Anyway, when I type
Application.fetch_env!(:map_app, :api_key) into iex I get
(ArgumentError) could not fetch application environment :api_key for application :my_app because configuration at :api_key was not set (elixir 1.10.3) lib/application.ex:653: Application.fetch_env!/2
What have I missed?