runDaemon
●test-convex · /daemon·async functionthrows When
Long-running foreground process: spins up a Convex backend via
, writes PID, URL, and admin-key marker files, and idles
until SIGTERM/SIGINT. Intended for pnpm dev:convex and the detached spawner
behind pnpm dev; the storefront and e2e harness re-attach by reading the
URL marker.
startConvex already installs orphan-proof signal handlers that stop the
backend; the additional handler here only removes the on-disk marker files so
the next dev run sees a clean state. Passing dataDir makes the backend
persistent, so its state directory survives a daemon restart for re-attach.
Signature
function runDaemon(opts: DaemonOptions): Promise<void>;Parameters
| Name | Type | Description |
|---|---|---|
opts | DaemonOptions |
Returns
Never resolves under normal operation; the process is terminated by a signal.
Throws
When
the backend fails to boot (propagated from ).