this repo has no description
1defmodule EslHnWeb.Router do
2 use EslHnWeb, :router
3
4 pipeline :api do
5 plug :accepts, ["json"]
6 end
7
8 scope "/api", EslHnWeb do
9 pipe_through :api
10 end
11
12 # Enable LiveDashboard in development
13 if Application.compile_env(:esl_hn, :dev_routes) do
14 # If you want to use the LiveDashboard in production, you should put
15 # it behind authentication and allow only admins to access it.
16 # If your application does not have an admins-only section yet,
17 # you can use Plug.BasicAuth to set up some basic authentication
18 # as long as you are also using SSL (which you should anyway).
19 import Phoenix.LiveDashboard.Router
20
21 scope "/dev" do
22 pipe_through [:fetch_session, :protect_from_forgery]
23
24 live_dashboard "/dashboard", metrics: EslHnWeb.Telemetry
25 end
26 end
27end