Phoenix v1.3.2 Phoenix.Endpoint.Handler behaviour View Source

API for exporting a webserver.

A handler will need to implement a child_spec/3 function which takes:

  • the scheme of the endpoint :http or :https
  • phoenix top-most endpoint module
  • phoenix app configuration for the specified scheme

It has to return a supervisor child specification.

Link to this section Summary

Callbacks

Provides a server child specification to be started under the endpoint

Link to this section Callbacks

Link to this callback child_spec(scheme, endpoint, config) View Source
child_spec(scheme :: atom(), endpoint :: module(), config :: Keyword.t()) ::
  Supervisor.Spec.spec()

Provides a server child specification to be started under the endpoint.