Created
February 9, 2016 09:27
-
-
Save willrax/6c054355583370a99de2 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 Plugger.Router do | |
use Plug.Router | |
plug Plugger.Authenticate, [token: “token”] | |
plug :match | |
plug :dispatch | |
def start_link do | |
Plug.Adapters.Cowboy.http(Plugger.Router, []) | |
end | |
get "/" do | |
conn | |
|> send_resp(200, “You’re in.”) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment