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 5852c19 commit 0842387Copy full SHA for 0842387
.env.test
@@ -0,0 +1,3 @@
1
+AIRTABLE_API_KEY=test-key
2
+AIRTABLE_BASE_ID=appTest
3
+AIRTABLE_TABLE_NAME=tbTest
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