-
-
Save josevalim/4736faa0849adedcf152 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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