We can't find the internet
Attempting to reconnect
Something went wrong!
Hang in there while we get back on track
A classic job interview question is: "What happens when you type a URL into your browser's address bar and hit Enter?" In my last post, I explained how it works in a Phoenix app: Phoenix initializes a
%Plug.Conn{}
representing the incoming HTTP request, then passes it through a chain of functions returning a new%Plug.Conn{}
with the response.For a static page rendered by a controller, that's all. But if the page is a LiveView (arguably Phoenix's killer feature), we're only just beginning. In this post I'll continue the story and explain how pressing "Enter" in your address bar can make Phoenix open a websocket and mount a LiveView.
continue reading on arrowsmithlabs.com
⚠️ This post links to an external website. ⚠️
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.