plushie/dev_server

Dev server: file watcher and recompiler for live reload.

Watches source directories for .gleam file changes, runs gleam build, detects changed BEAM modules, reloads them, and tells the runtime to re-render. The UI updates without losing application state.

Started automatically when dev: True is set in StartOpts. Requires the file_system Erlang package.

Types

Messages handled by the dev server actor.

pub opaque type DevMessage

Values

pub fn start(
  runtime: process.Subject(runtime.RuntimeMessage),
) -> Nil

Start the dev server actor, watching src/ for changes.

pub fn start_supervised(
  runtime: process.Subject(runtime.RuntimeMessage),
) -> Result(
  actor.Started(process.Subject(DevMessage)),
  actor.StartError,
)

Start the dev server under a supervisor.

Returns Started for use as a supervisor child spec.

Search Document