Created
May 19, 2020 14:22
-
-
Save Maartz/ae20e3eb350f1eba1d58d51754c8277f to your computer and use it in GitHub Desktop.
liveview router
This file contains 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 LiveViewStudioWeb.Router do | |
use LiveViewStudioWeb, :router | |
pipeline :browser do | |
plug :accepts, ["html"] | |
plug :fetch_session | |
plug :fetch_live_flash | |
plug :put_root_layout, {LiveViewStudioWeb.LayoutView, :root} | |
plug :protect_from_forgery | |
plug :put_secure_browser_headers | |
end | |
pipeline :api do | |
plug :accepts, ["json"] | |
end | |
scope "/", LiveViewStudioWeb do | |
pipe_through :browser | |
live "/", PageLive | |
live "/light", LigthLive # Live elixir macro | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment