# `mix star_view.setup.stream_page`
[🔗](https://github.com/Neophen/star_view/blob/v0.7.0/lib/mix/tasks/star_view.setup.stream_page.ex#L2)

Generates an SSE streaming demo page driven by Phoenix.PubSub

Generates a working end-to-end streaming example:

* `MyAppWeb.StreamDemoPage` — a `StarView.Page` at `/stream-demo` that
  opens an SSE stream on load (`connect()`), subscribes to PubSub in
  `handle_connect/2`, and patches signals from `handle_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.Router` plus
  `star_view "/stream-demo", StreamDemoPage`.

## Example

```sh
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.

