Phoenix.Endpoint
Phoenix.Endpoint
Defines a Phoenix endpoint.
The endpoint is the boundary where all requests to your web application start. It is also the interface your application provides to the underlying web servers.
Overall, an endpoint has three responsibilities:
-
to provide a wrapper for starting and stopping the endpoint as part of a supervision tree;
-
to define an initial plug pipeline where requests are sent through;
- to host web specific configuration for your application.
Endpoints
An endpoint is simply a module defined with the help of Phoenix.Endpoint
. If you have used the mix phoenix.new
generator, an endpoint was automatically generated as part of your application:
defmodule YourApp.Endpoint do
use Phoenix.Endpoint, otp_app