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.
import { WebApp } from "@514labs/moose-lib";const webApp = new WebApp("webapp", your_framework_app, { mountPath: "/webapp", metadata: { description: "Your framework application", },});Each WebApp mounts your framework under a unique path.
const webApp = new WebApp("webapp", your_framework_app, { mountPath: "/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);import { getMooseUtils } from "@514labs/moose-lib"; const { client, sql, jwt } = getMooseUtils(req);