SquidSonar.Router (squid_sonar v0.1.1)

Copy Markdown View Source

Router helpers for mounting SquidSonar inside a Phoenix application.

The host owns its endpoint, authentication, layout, and deployment topology. SquidSonar contributes only the LiveView routes under the requested path.

Summary

Functions

Mounts SquidSonar under the given path.

Functions

squid_sonar(path, opts \\ [])

(macro)

Mounts SquidSonar under the given path.

scope "/" do
  pipe_through [:browser]

  squid_sonar "/sonar", otp_app: :my_app
end

Supported options:

  • :as - route helper name for the mounted LiveView session.
  • :socket_path - LiveView socket path used by the host application. Defaults to "/live".
  • :transport - LiveView client transport. Use "websocket" or "longpoll". Defaults to "websocket".