3 ms·
Endpoint == instance of phoenix webserver. Changing things in the endpoint gives you WAF-like control and you can do some early footwork here and store useful d
by 0x000000001 5y ago
Endpoint == instance of phoenix webserver. Changing things in the endpoint gives you WAF-like control and you can do some early footwork here and store useful data in conn[:private] for you to use later in the modules called in your router
You can have multiple routers. I just built a thing where foo.com uses one router for the main site and *.foo.com is something else.
- dnautics 5y agoPoint is, they are just plugs. You can put routes in an endpoint, it'll work just fine. The distinction is just a -often useful- prescriptive opinion by Phoenix. (Plug does not split between endpoints and routers)
- 0x000000001 5y agovery true, but the abstraction is pretty useful
- dnautics 5y agoit's useful if your project gets very large. It is a non-negligible cognitive cost when your project is very small and you are new to Elixir and Phoenix