defmodule EslHnWeb.Router do use EslHnWeb, :router pipeline :api do plug :accepts, ["json"] end scope "/", EslHnWeb do pipe_through :api get "/", API.Controller, :index get "/:id", API.Controller, :show end if Application.compile_env(:esl_hn, :dev_routes) do import Phoenix.LiveDashboard.Router scope "/dev" do pipe_through [:fetch_session, :protect_from_forgery] live_dashboard "/dashboard", metrics: EslHnWeb.Telemetry end end end