Created
May 31, 2015 05:43
-
-
Save darui00kara/1963969c7a53e0527e11 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 HelloPhoenix.Router do | |
use HelloPhoenix.Web, :router | |
pipeline :browser do | |
plug :accepts, ["html"] | |
plug :fetch_session | |
plug :fetch_flash | |
plug :protect_from_forgery | |
end | |
pipeline :api do | |
plug :accepts, ["json"] | |
end | |
scope "/", HelloPhoenix do | |
pipe_through :browser # Use the default browser stack | |
get "/", PageController, :index | |
get "/hello", HelloController, :index | |
end | |
# Other scopes may use custom stacks. | |
# scope "/api", HelloPhoenix do | |
# pipe_through :api | |
# end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment