Generates an SSE streaming demo page driven by Phoenix.PubSub
Generates a working end-to-end streaming example:
MyAppWeb.StreamDemoPage— aStarView.Pageat/stream-demothat opens an SSE stream on load (connect()), subscribes to PubSub inhandle_connect/2, and patches signals fromhandle_info/2.MyApp.DemoTicker— a GenServer added to your supervision tree that broadcasts the server time over Phoenix.PubSub every second.- Router wiring —
import StarView.Routerplusstar_view "/stream-demo", StreamDemoPage.
Example
mix star_view.setup.stream_page
Then start the server and open /stream-demo — the page updates every
second without polling or custom JavaScript. Both generated modules are
demo code: delete them freely.