Created
June 7, 2015 05:59
-
-
Save darui00kara/95d39578436e1077628b 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 PhoenixChannels.Router do | |
use PhoenixChannels.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 "/", PhoenixChannels do | |
pipe_through :browser # Use the default browser stack | |
get "/", PageController, :index | |
end | |
socket "/ws", PhoenixChannels do | |
channel "rooms:*", RoomChannel | |
end | |
# Other scopes may use custom stacks. | |
# scope "/api", PhoenixChannels do | |
# pipe_through :api | |
# end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment