Advertisement
Guest User

Untitled

a guest
Jun 30th, 2015
235
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. defmodule HelloPhoenix.Router do
  2. use HelloPhoenix.Web, :router
  3.  
  4. pipeline :browser do
  5. plug :accepts, ["html"]
  6. plug :fetch_session
  7. plug :fetch_flash
  8. plug :protect_from_forgery
  9. end
  10.  
  11. pipeline :api do
  12. plug :accepts, ["json"]
  13. end
  14.  
  15. scope "/", HelloPhoenix do
  16. pipe_through :browser # Use the default browser stack
  17.  
  18. get "/", PageController, :index
  19. get "/hello", HelloController, :index
  20. get "/hello/:messenger", HelloController, :show
  21. end
  22.  
  23. # Other scopes may use custom stacks.
  24. # scope "/api", HelloPhoenix do
  25. # pipe_through :api
  26. # end
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement