Installs PhoenixDatastar into your Phoenix application.
Usage
mix phoenix_datastar.installThis will:
- Add
:phoenix_datastartoimport_depsin.formatter.exs - Add the Registry to your application's supervision tree
- Enable stripping of debug annotations in dev (for SSE patches)
- Add
import PhoenixDatastar.Routerto your router - Add
"sse"to the browser pipeline's:acceptsplug - Add the global
/__datastarscope withStreamPlugandNavPlugroutes - Add
def live_datastaranddef datastarto your web module - Add the Datastar JavaScript to your root layout