# Other scopes may use custom stacks. # scope "/api", PreflightWeb do # pipe_through :api # end
# Enable LiveDashboard and Swoosh mailbox preview in development ifApplication.compile_env(:preflight, :dev_routes) do importPhoenix.LiveDashboard.Router
scope "/dev"do pipe_through :browser
live_dashboard "/dashboard", metrics:PreflightWeb.Telemetry forward "/mailbox", Plug.Swoosh.MailboxPreview end end end
defmodulePreflightWeb.PageHTMLdo @moduledoc""" This module contains pages rendered by PageController. See the `page_html` directory for all templates available. """ usePreflightWeb, :html
mix phs.routes GET / PreflightWeb.PageController :home GET /dev/dashboard/css-:md5 Phoenix.LiveDashboard.Assets :css GET /dev/dashboard/js-:md5 Phoenix.LiveDashboard.Assets :js GET /dev/dashboard Phoenix.LiveDashboard.PageLive :home GET /dev/dashboard/:page Phoenix.LiveDashboard.PageLive :page GET /dev/dashboard/:node/:page Phoenix.LiveDashboard.PageLive :page * /dev/mailbox Plug.Swoosh.MailboxPreview [] WS /live/websocket Phoenix.LiveView.Socket GET /live/longpoll Phoenix.LiveView.Socket POST /live/longpoll Phoenix.LiveView.Socket