MooseStack lets you expose HTTP endpoints for ingestion, analytics, and workflow triggers.
You can do this in two distinct ways:
WebApp.If you want to embed Moose as a library inside an existing web app (no separate Moose Runtime service), follow the “Add to Existing App” guides like Next.js or Fastify.
Moose APIs are application-facing HTTP interfaces that sit on top of your Moose modules (OLAP tables, streams, workflows). They’re designed to be composed with the rest of your project, not used in isolation.
APIs are where external systems interface with your OLAP database. MooseStack gives you a path that is:
client/sql access patterns across handlers.| You want… | Use… |
|---|---|
| Fastest path to ingestion/analytics endpoints | Native Moose APIs |
| Custom middleware/routing, but still want Moose to run your web server | WebApp (inside Moose Runtime) |
| Typed ClickHouse models + queries in your existing backend runtime | Embed MooseStack in an existing app (e.g. Fastify) |
Native APIs are best for straightforward endpoints with minimal routing/middleware needs.
If you want a full-featured web framework, MooseStack can host it via WebApp as part of the Moose Runtime.
Why embed your framework:
client, sql, jwt)Supported adapters include: Express, Fastify, Koa, raw Node.js, and FastAPI.
If you already have an app server (like Next.js or Fastify), you can keep it where it is and use Moose as a CLI tool (for schema migrations) and library (for type-safe ClickHouse queries) without deploying a separate Moose Runtime web service.
WebApp runs your API framework inside the Moose Runtime. Client-only embedding keeps your existing app server and uses Moose as a library (see Next.js).