bdd181425b
Docker Compose project with automated Playwright benchmarks comparing django-liveview 2.2.0 against Phoenix LiveView 1.0 across 6 scenarios.
36 lines
798 B
Elixir
36 lines
798 B
Elixir
defmodule BenchmarkWeb.Endpoint do
|
|
use Phoenix.Endpoint, otp_app: :benchmark
|
|
|
|
@session_options [
|
|
store: :cookie,
|
|
key: "_benchmark_key",
|
|
signing_salt: "bnchmrk",
|
|
same_site: "Lax"
|
|
]
|
|
|
|
socket "/live", Phoenix.LiveView.Socket, websocket: [connect_info: [session: @session_options]]
|
|
|
|
plug Plug.Static,
|
|
at: "/",
|
|
from: :benchmark,
|
|
gzip: false,
|
|
only: BenchmarkWeb.static_paths()
|
|
|
|
if code_reloading? do
|
|
plug Phoenix.CodeReloader
|
|
end
|
|
|
|
plug Plug.RequestId
|
|
plug Plug.Telemetry, event_prefix: [:phoenix, :endpoint]
|
|
|
|
plug Plug.Parsers,
|
|
parsers: [:urlencoded, :multipart, :json],
|
|
pass: ["*/*"],
|
|
json_decoder: Phoenix.json_library()
|
|
|
|
plug Plug.MethodOverride
|
|
plug Plug.Head
|
|
plug Plug.Session, @session_options
|
|
plug BenchmarkWeb.Router
|
|
end
|