startConvex
Starts a local Convex backend via the bundled convex dev CLI in anonymous
agent mode and returns its deployment URL, admin key, and a stop() handle.
The child is spawned detached (its own process group) so stop() — and the
orphan-proof shutdown handlers — can terminate both convex dev and its
convex-local-backend grandchild in one signal. The inherited
CONVEX_DEPLOYMENT/CONVEX_DEPLOY_KEY/self-hosted variables are blanked so
the CLI provisions a throwaway local deployment instead of targeting the
project's real cloud deployment. Boot-to-ready latency is logged for the e2e
flake budget.
Signature
function startConvex(opts: StartConvexOptions): Promise<StartedConvex>;Parameters
| Name | Type | Description |
|---|---|---|
opts | StartConvexOptions |
Returns
A with the deployment URL, admin key, and stop handle.
Throws
Related
StartConvexOptions StartedConvex resolveConvexProjectDir resolveConvexStateDir
StartConvexOptions
Options for . All fields are optional; omitting them starts an ephemeral local Convex backend that is torn down on stop().
StartedConvex
Handle returned by . Carries the deployment URL and the admin key needed to authenticate writes, plus a stop() method that cleanly shuts the backend down, optio