StartConvexOptions
●test-convex · /start·interface
Options for . All fields are optional; omitting them
starts an ephemeral local Convex backend that is torn down on stop().
Properties
PROPTYPEDESCRIPTION
dataDir?
string
When set, the backend persists its data to this directory and survives ``.stop()``.
port?
number
Fixed port. Useful with ``dataDir`` so re-attaches hit the same deployment URL.
Example
// Ephemeral — for integration tests:
const convex = await startConvex();
// Persistent — for pnpm dev:
const convex = await startConvex({ dataDir: '.convex-dev', port: 3210 });Related
StartedConvex resolveConvexProjectDir resolveConvexStateDir startConvex
resolveConvexStateDir
Resolves the projectlocal Convex state directory (<projectDir/.convex) the local/anonymous backend persists its SQLite database, storage, and deployment config
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 i