mix dala.server (dala_dev v0.0.3)

Copy Markdown View Source

Starts the Dala dev server and opens it in the browser.

mix dala.server
mix dala.server --port 4040   # default port

The server provides:

  • Live device status cards (Android + iOS simulator)
  • Per-device deploy buttons ("Update" and "First Deploy")
  • Streaming log panel (logcat / iOS simulator console)

The server runs until you press Ctrl+C.

For an interactive IEx session alongside the dashboard:

iex -S mix dala.server

Under the hood

mix dala.server starts a Phoenix + Bandit supervision tree directly in the Mix process — equivalent to iex -S mix phx.server for a Phoenix app, except it starts the supervisor inline rather than through the application callback:

Application.ensure_all_started(:bandit)
Application.ensure_all_started(:phoenix_live_view)

Supervisor.start_link([
  {Phoenix.PubSub, name: DalaDev.PubSub},
  DalaDev.Server.Endpoint,          # Bandit HTTP server on port 4040
  DalaDev.Server.DevicePoller,      # polls adb + xcrun simctl
  DalaDev.Server.LogStreamerSupervisor,  # logcat / simctl log streams
  DalaDev.Server.WatchWorker,       # optional file-watch loop
  ...
], strategy: :one_for_one)

open "http://localhost:4040"       # macOS: open, Linux: xdg-open

The endpoint uses Bandit.PhoenixAdapter instead of Cowboy, so there is no :plug_cowboy dependency. Everything else is standard Phoenix LiveView.