Effect host example
The repository’s Effect host example is a runnable private application. Its README covers setup, configuration, tracing, and shutdown.
The application acquires Monque.scoped inside its database scope. Native
.effects operations register a Worker with a captured application service and
enqueue a Job. The same instance supplies native .effects to Management.
BunRuntime handles process signals; BunHttpServer runs the loopback listener.
@monque/management-effect mounts RPC, versioned HTTP and OpenAPI.
@monque/dashboard-effect serves the shared assets with custom mounts injected
at runtime, including on deep links.
Authentication protects both mounts, including HTML, assets, RPC, HTTP and OpenAPI. Request-local identity determines native authorization and capabilities for viewer, operator and read-only access. Management enforces body limits, origin checks and input validation.
Ordinary startup needs no OpenTelemetry packages. Explicit tracing uses an application-owned provider. On shutdown, the application closes HTTP, disposes Monque, closes MongoDB, then shuts down its optional provider. See the example’s README for incomplete-work and interruption semantics.
Cancellation cannot undo MongoDB writes or external effects.