Beaker.Router

Beaker.Router is a router for Beaker integration into Phoenix. Importantly, it is NOT the entry point to Beaker from a Phoenix app. Instead, that should be Beaker.Web.

To automatically be able to access a view with your Beaker metrics, you’ll need to

1) Add beaker and phoenix to the dependencies in your Mixfile:

defp deps do
  [
    {:phoenix, ">= 0.14"},
    {:phoenix_html, ">= 1.2"}
  ]
end

2) Add beaker and phoenix_html to the started applications in your Mixfile:

def application do
  applications: [:phoenix, :phoenix_html, :beaker]
end

3) Forward requests to Beaker.Web in your router:

forward "/beaker", Beaker.Web
Source

Summary

call(conn, opts)

Callback invoked by Plug on every request

channel_for_topic(topic, transport)
init(opts)

Callback required by Plug that initializes the router for serving web requests

static_path(conn, path)

Functions

call(conn, opts)

Callback invoked by Plug on every request.

Source
channel_for_topic(topic, transport)
Source
init(opts)

Callback required by Plug that initializes the router for serving web requests.

Source
static_path(conn, path)
Source