endpoint.ex 文件在 phoenix elixir 中有什么作用

what does endpoint.ex file do in phoenix elixir

我是 elixir 和 phoenix 的新手,正在使用 phoenix 指南。在入门指南中,他们只说 http://puu.sh/klblD/e50082298d.png 但他们没有解释什么是端点和什么是任务。有人可以解释一下它的作用吗?

不要从@Gazier 那里拿走任何东西,但我同意@JoseValim;他的回复应该是一个答案,以便其他可能寻找此内容的人可以轻松找到它。

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.

文档是 here