Created
October 24, 2014 21:09
-
-
Save j-mcnally/044a231a6988f4084e83 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 | |
require Logger | |
import Plug.Conn | |
use Plug.Router | |
plug :match | |
plug :dispatch | |
def init(options) do | |
# initialize options | |
setup_routes(options[:mount] || "") | |
options | |
end | |
def setup_routes(namespace \\ "") do | |
get "#{namespace}/queues" do | |
Logger.debug "YOLO" | |
conn |> halt | |
end | |
end | |
match _ do | |
conn | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment