stratal-incremental-adoption
Incremental Adoption — Mounting Stratal into an Existing Hono App
Stratal exposes its underlying HonoApp (which extends OpenAPIHono) via the stratal.hono getter. This lets you mount a Stratal instance as a sub-app inside an existing Hono application, adopting it incrementally without rewriting everything at once.
Full documentation: Incremental Adoption
Mounting Stratal into an Existing Hono App
Create a Stratal instance with your module, then mount it using Hono's app.route():
// stratal-app.ts
import { Stratal } from 'stratal'
import { UsersModule } from './users/users.module'
export const stratal = new Stratal({ module: UsersModule })
More from strataljs/stratal
stratal
Build Cloudflare Workers applications with the Stratal framework. Use when code imports from 'stratal' or '@stratal/*', when creating modules, controllers, services, routes, queue consumers, cron jobs, or CLI commands, or when user mentions Stratal, asks to 'create a module', 'add an endpoint', 'set up auth', 'configure database', 'add error handling', 'set up Inertia', or 'run quarry'. Covers DI, routing with OpenAPI, error handling, i18n, testing, auth, RBAC, Inertia.js SSR, and MCP server. Do NOT use for generic Hono apps, plain Cloudflare Workers, or NestJS.
20stratal-framework
>-
7stratal-testing
>-
6stratal-seeders
>-
5stratal-zenstack-plugin
>-
1