From 88c0fbf10145ddd4ccd10ee432b4ca1aadd96a91 Mon Sep 17 00:00:00 2001 From: Melonai Date: Fri, 7 May 2021 17:11:50 +0200 Subject: Initial structure --- lib/rook_web/router.ex | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 lib/rook_web/router.ex (limited to 'lib/rook_web/router.ex') diff --git a/lib/rook_web/router.ex b/lib/rook_web/router.ex new file mode 100644 index 0000000..298d722 --- /dev/null +++ b/lib/rook_web/router.ex @@ -0,0 +1,28 @@ +defmodule RookWeb.Router do + use RookWeb, :router + + pipeline :browser do + plug :accepts, ["html"] + plug :fetch_session + plug :fetch_flash + plug :protect_from_forgery + plug :put_secure_browser_headers + end + + pipeline :api do + plug :accepts, ["json"] + end + + scope "/", RookWeb do + pipe_through :browser + + get "/", HomeController, :index + get "/share", AppController, :share + get "/:token", AppController, :request + end + + # Other scopes may use custom stacks. + # scope "/api", RookWeb do + # pipe_through :api + # end +end -- cgit 1.4.1