EndPointBlank.Phoenix.EndpointRegistrar (end_point_blank_elixir v0.3.1)

Copy Markdown

Introspects a Phoenix router at application startup and registers all endpoints with the EndPointBlank API.

Call register/1 from your OTP application's start/2, after calling EndPointBlank.configure/1:

def start(_type, _args) do
  EndPointBlank.configure(...)
  EndPointBlank.Phoenix.EndpointRegistrar.register(MyAppWeb.Router)
  children = [MyAppWeb.Endpoint]
  Supervisor.start_link(children, strategy: :one_for_one)
end

Summary

Functions

Reads all routes from router, enriches them with any version metadata declared via EndPointBlank.Phoenix.Versioned, and calls EndPointBlank.Commands.EndpointUpdate.update/1.

Functions

register(router)

Reads all routes from router, enriches them with any version metadata declared via EndPointBlank.Phoenix.Versioned, and calls EndPointBlank.Commands.EndpointUpdate.update/1.