runDaemon
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
Related
runCli DaemonOptions SeedClerkOperatorOptions SeedCmsOptions SeedCanonicalOptions SeedClerkOperatorView SeedShopOptions seedCanonical
runCli
Dispatches a testconvex subcommand and returns its process exit code. Returning a code (rather than calling process.exit) keeps the dispatcher importable and un
SeedCanonicalOptions
Customization knobs for the canonical seed. Identical to the shop seed's options — the CMS phase has no knobs of its own (its documents key off the shop id the