Music streaming on ATProto!
1defmodule CometWeb.Router do 2 use CometWeb, :router 3 4 pipeline :api do 5 plug :accepts, ["json"] 6 end 7 8 scope "/api", CometWeb do 9 pipe_through :api 10 end 11 12 # Enable LiveDashboard in development 13 if Application.compile_env(:comet, :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: CometWeb.Telemetry 25 end 26 end 27end