We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 790bab8 commit fa304b0Copy full SHA for fa304b0
config/runtime.exs
@@ -21,10 +21,16 @@ if System.get_env("PHX_SERVER") do
21
config :elixir_playground, ElixirPlaygroundWeb.Endpoint, server: true
22
end
23
24
-if File.exists?(".env") do
+env_file =
25
+ case config_env() do
26
+ :test -> ".env.test"
27
+ _ -> ".env"
28
+ end
29
+
30
+if File.exists?(env_file) do
31
IO.inspect(config_env())
- IO.puts("Loading environment variables from .env")
- source!([".env"])
32
+ IO.puts("Loading environment variables from #{env_file}")
33
+ source!([env_file])
34
35
36
config :elixir_playground, :airtable,
0 commit comments