Complete walk-through of the Phoenix HTTP request life-cycle from endpoint to response
Complete walk-through of the Phoenix HTTP request life-cycle from endpoint to response.
index
for listing products, show
for a specific product)
conn
(connection) and params
(URL/query)render
[Controller]HTML
module, returns HTML using the HEEx (HTML + Elixir) syntaxembed_templates/1
to keep large templates in separate files/products
= index view/products/:id
= show view (gets product ID from params
)assigns
), accessed with @prop
in HEEx[Controller]JSON
and return maps; Phoenix converts to JSON (will be covered in detail later)This video demystifies how an HTTP request is routed through Phoenix to return HTML (or JSON), with a concrete example building product listing/detail routes and views, highlighting core concepts like routing, controllers, views, assigns, and development workflow.