-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathrouter.ex
More file actions
39 lines (33 loc) · 1.01 KB
/
router.ex
File metadata and controls
39 lines (33 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
defmodule LiveReactExamplesWeb.Router do
use LiveReactExamplesWeb, :router
pipeline :browser do
plug :accepts, ["html"]
plug :fetch_session
plug :fetch_live_flash
plug :put_root_layout, html: {LiveReactExamplesWeb.Layouts, :root}
plug :protect_from_forgery
plug :put_secure_browser_headers
end
# pipeline :api do
# plug :accepts, ["json"]
# end
scope "/", LiveReactExamplesWeb do
pipe_through :browser
get "/", PageController, :home
get "/lazy", PageController, :lazy
get "/simple", PageController, :simple
get "/simple-props", PageController, :simple_props
get "/typescript", PageController, :typescript
live "/live-counter", LiveCounter
live "/context", LiveContext
live "/log-list", LiveLogList
live "/flash-sonner", LiveFlashSonner
live "/ssr", LiveSSR
live "/hybrid-form", LiveHybridForm
live "/slot", LiveSlot
end
# Other scopes may use custom stacks.
# scope "/api", LiveReactExamplesWeb do
# pipe_through :api
# end
end