examples/phoenix-liveview/README.md
This is an example Phoenix LiveView application that uses
Electric.Phoenix.LiveView.electric_stream/4
to sync data from Postgres into a LiveView using
Phoenix Streams.
This keeps the LiveView automatically in-sync with Postgres, without having
to re-run queries or trigger any change handling yourself.
See the documentation for more details.
To start your Phoenix server:
mix electric.start to start an Electric instance and associated Postgres DB.mix setup to install and setup dependenciesmix phx.server or inside IEx with iex -S mix phx.serverNow you can visit localhost:4000 from your browser.
If you open two separate windows, you will see you changes happen simultaneously in both windows.
See the Electric.PhoenixExampleWeb.TodoLive.Index
module and the
Electric.Phoenix documentation.