Created
August 19, 2017 13:59
-
-
Save AndrewDryga/a60fe6dd1f73b10c67bf6a42990e062f to your computer and use it in GitHub Desktop.
System typles example for Phoenix
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyAppAPI.Endpoint do | |
use Phoenix.Endpoint, otp_app: :myapp_api | |
# ... | |
@doc """ | |
Callback invoked for dynamically configuring the endpoint. | |
It receives the endpoint configuration and checks if | |
configuration should be loaded from the system environment. | |
""" | |
def init(_key, config), | |
do: Confex.fetch_env(config) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment