System.get_env("PORT")Use instead {:system, "PORT"}:
$ git diff
diff --git a/phoenix/config/test.exs b/phoenix/config/test.exs
index 10cea91..617f34c 100644
@@ -1,7 +1,7 @@
use Mix.Config
config :youli, Youli.Endpoint,
- http: [port: System.get_env("PORT") || 4001]
+ http: [port: {:system, "PORT"}]
The documentation for this is lib/phoenix/endpoint.exin source at Phoenix.
source
share