Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
defmodule Exq.RouterPlug do
import Plug.Conn
use Plug.Router
plug :match
plug :dispatch
get "/queues" do
IO.puts "YOLO"
conn |> halt()
end
match _ do
conn
end
end
defmodule ExqUi.Router do
use Phoenix.Router
pipeline :before do
plug :super
plug Exq.RouterPlug
end
scope "/" do
# Use the default browser stack.
pipe_through :browser
get "/", ExqUi.PageController, :index, as: :pages
end
# Other scopes may use custom stacks.
# scope "/api" do
# pipe_through :api
# end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.