Lotechnica

Technical writings by Nathan Shafer

Articles with the phoenix tag

Configuring a dev environment for Phoenix package development

When developing a hex package intended to be used with Phoenix projects, such as a component library, plug, on_mount callback, or any other piece of shared code, Phoenix needs some extra configuration to enable the great developer experience we have come to expect. By default, a Phoenix app will only … Read more

The Stock Market Game, made easy with Phoenix LiveView

A couple years ago my wife, who is an 8th grade US History teacher, came to me for help with a spreadsheet to simulate the US stock market leading up to the crash in 1929. The spreadsheet was cumbersome, very complicated for the students, and a major pain for her … Read more

Dynamic configuration for Phoenix Endpoints

Update 2024-04-10: This article has been updated with a better Workaround that uses your generated MyappWeb.Endpoint.start_link/1. The original article called directly into Phoenix.Endpoint.Supervisor which was more brittle. In Phoenix 1.7.11, the Endpoint.init/2 callback was deprecated. If you have defined it, then … Read more