Advertisement
Guest User

Untitled

a guest
Jul 5th, 2015
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. defmodule PhoenixChannels.Router do
  2. use PhoenixChannels.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 "/", PhoenixChannels do
  16. pipe_through :browser # Use the default browser stack
  17.  
  18. get "/", PageController, :index
  19. end
  20.  
  21. socket "/ws", PhoenixChannels do
  22. channel "rooms:*", RoomChannel
  23. end
  24.  
  25. # Other scopes may use custom stacks.
  26. # scope "/api", PhoenixChannels do
  27. # pipe_through :api
  28. # end
  29. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement