Current section

Files

Jump to
phoenix priv template web router.ex
Raw

priv/template/web/router.ex

defmodule <%= application_module %>.Router do
use Phoenix.Router
pipeline :browser do
plug :accepts, ~w(html)
plug :fetch_session
end
pipeline :api do
plug :accepts, ~w(json)
end
scope "/", <%= application_module %> do
pipe_through :browser # Use the default browser stack
get "/", PageController, :index
end
# Other scopes may use custom stacks.
# scope "/api", <%= application_module %> do
# pipe_through :api
# end
end