workflow-world-mongodb
v4.0.1-beta.1
Published
A reference World implementation backed by MongoDB
Readme
@workflow/world-mongodb
@workflow/world-mongodb provides a MongoDB-backed implementation of the Workflow “World” interfaces. It offers durable storage for workflow runs, steps, events, hooks, and streaming, plus queue integration that reuses the embedded world HTTP handlers for execution.
Usage
Install the dependencies inside the monorepo with pnpm install, then build the package:
pnpm --filter @workflow/world-mongodb buildAt runtime set the WORKFLOW_TARGET_WORLD environment variable to @workflow/world-mongodb (or the built entry point) and configure a MongoDB connection string via WORKFLOW_MONGODB_URI. Optional environment variables include:
WORKFLOW_MONGODB_DB– overrides the database name.WORKFLOW_MONGODB_COLLECTION_PREFIX– custom prefix for collection names.
Run the Vitest suite with:
pnpm --filter @workflow/world-mongodb testTests use mongodb-memory-server, so no additional services are required locally.
