Skip to content

Instantly share code, notes, and snippets.

@AndrewDryga
Created August 19, 2017 13:59
Show Gist options
  • Save AndrewDryga/a60fe6dd1f73b10c67bf6a42990e062f to your computer and use it in GitHub Desktop.
Save AndrewDryga/a60fe6dd1f73b10c67bf6a42990e062f to your computer and use it in GitHub Desktop.
System typles example for Phoenix
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