defmodule BenchmarkWeb.Router do use BenchmarkWeb, :router pipeline :browser do plug :accepts, ["html"] plug :fetch_session plug :fetch_live_flash plug :put_root_layout, html: {BenchmarkWeb.Layouts, :root} plug :protect_from_forgery plug :put_secure_browser_headers end pipeline :api do plug :accepts, ["json"] end scope "/", BenchmarkWeb do pipe_through :browser live "/", DashboardLive, :index end scope "/bench", BenchmarkWeb do pipe_through :api get "/clear", BenchController, :clear get "/populate", BenchController, :populate end end