MooseStack allows you to embed a supported framework inside your MooseStack application. This is useful when you need full framework routing/middleware but still want MooseStack to run and deploy everything together.
MooseStack provides adapters for the following frameworks:
Optionally, if you already have a running app server, you can keep it where it is and use MooseStack as a library for ClickHouse modeling + type-safe queries (no separate Moose Runtime web service).
The WebApp class is the bridge between your web framework and MooseStack. It handles:
See framework templates for complete working examples with Express, Fastify, Koa, FastAPI, and more.
from moose_lib import WebApp, WebAppConfig, WebAppMetadata# Register as WebAppweb_app = WebApp( "webapp", your_framework_app, WebAppConfig( mount_path="/webapp", metadata=WebAppMetadata(description="Your framework application") ))Each WebApp mounts your framework under a unique path.
web_app = WebApp( "webapp", your_framework_app, WebAppConfig( mount_path="/webapp", ## ... other config ... ))//admin, /api, /consumption, /health, /ingest, /mcp, /moose, /ready, /workflowsYour frameworks can now access your OLAP database through MooseStack's injected utilities. This includes the Moose ClickHouse client, SQL helpers, and JWT utilities.
import { getMooseUtils } from "@514labs/moose-lib"; const { client, sql, jwt } = getMooseUtils(req);from moose_lib.dmv2.web_app_helpers import get_moose_utils moose = get_moose_utils(request)client = moose.clientjwt = moose.jwt