Continuum.Observer.Router (continuum v0.5.0)

Copy Markdown View Source

Router macro for mounting the optional Continuum Observer.

Mount the Observer only inside an authenticated admin scope:

import Continuum.Observer.Router

scope "/admin" do
  pipe_through [:browser, :authenticate_admin]
  continuum_observer "/continuum", instance: :myapp_continuum
end

Continuum ships no built-in Observer authentication.

Summary

Functions

Defines the Observer routes under path.

Functions

continuum_observer(path, opts \\ [])

(macro)

Defines the Observer routes under path.

Options:

  • :instance - Continuum instance name. Defaults to Continuum.
  • :layout - Optional {Module, :function} LiveView layout passed through to Phoenix.LiveView.Router.live_session/3. Use this when you need a custom HTML chrome around the Observer (for example to load the LV.js client from a development demo).