Created
June 15, 2015 02:10
-
-
Save darui00kara/9e7e5ba086b2e15d6344 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 TrotSample.Router do | |
use Trot.Router | |
use Trot.Template | |
get "/", do: 200 | |
get "/hello" do | |
"Hello Trot!!" | |
end | |
get "/hello/haml" do | |
render_template("template.html.haml", [message: "Hello Haml"]) | |
end | |
get "/hello/eex" do | |
render_template("template.html.eex", [message: "Hello EEx"]) | |
end | |
import_routes Trot.NotFound | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment