Module

server.dev

Development server with hot reload.

Starts a pounce ASGI server with the live chirp App object. Uses single-worker mode with reload enabled for development.

Functions

run_dev_server 8 None
Start a pounce dev server with the given chirp App. Pounce's ``run()`` takes a…
def run_dev_server(app: object, host: str, port: int, *, reload: bool = True, reload_include: tuple[str, ...] = (), reload_dirs: tuple[str, ...] = (), app_path: str | None = None, lifecycle_collector: object | None = None) -> None

Start a pounce dev server with the given chirp App.

Pounce'srun() takes an import string (e.g., "myapp:app"), but chirp has a liveApp object. We use pounce.Server directly with the ASGI callable.

Parameters
Name Type Description
app object

ASGI callable (chirp App instance).

host str

Bind host address.

port int

Bind port number.

reload bool

Enable auto-reload on file changes (default True).

Default:True
reload_include tuple[str, ...]

Extra file extensions to watch when reload is active (e.g.(".html", ".css", ".md")).

Default:()
reload_dirs tuple[str, ...]

Extra directories to watch alongside cwd.

Default:()
app_path str | None

Optional"module:attribute"import string. When provided, pounce reimports the app on each reload cycle so that code changes on disk take effect immediately.

Default:None
lifecycle_collector object | None

Optional Pounce LifecycleCollector for observability. Forwarded to the Pounce Server.

Default:None