Created
October 22, 2016 16:18
-
-
Save renanvalentin/09681d28a4e35852419febd9629d631e to your computer and use it in GitHub Desktop.
This file contains 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 LearningElixir.Router do | |
use Plug.Router | |
plug :match | |
plug :dispatch | |
get "/" do | |
send_resp(conn, 200, "Hello") | |
end | |
match _ do | |
send_resp(conn, 404, "oops") | |
end | |
end | |
~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment