Current section

Files

Jump to
hangman_live lib hangman_live_web router.ex
Raw

lib/hangman_live_web/router.ex

defmodule Hangman.LiveWeb.Router do
use Hangman.LiveWeb, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_live_flash
plug :put_root_layout, html: {Hangman.LiveWeb.Layouts, :root}
plug :protect_from_forgery
plug :put_secure_browser_headers
end
pipeline :api do
plug :accepts, ["json"]
end
scope "/", Hangman.LiveWeb do
pipe_through :browser
get "/", PageController, :home
live "/hangman", HangmanLive
end
# Other scopes may use custom stacks.
# scope "/api", Hangman.LiveWeb do
# pipe_through :api
# end
end