QUESTPIE
Integrate FrontendAdapters

Hono Adapter

Serve QUESTPIE APIs with Hono.

The Hono adapter connects QUESTPIE to the Hono web framework.

Install

bun add @questpie/hono hono

Setup

src/index.ts
import { Hono } from "hono";
import { createFetchHandler } from "@questpie/hono/server";
import { app } from "#questpie";

const server = new Hono();

const handler = createFetchHandler(app, { basePath: "/api" });

server.all("/api/*", (c) => handler(c.req.raw));

export default server;

With OpenAPI

OpenAPI is now registered as a module rather than wrapping the handler. Add openApiModule() to your modules.ts:

modules.ts
import { adminModule } from "@questpie/admin/server";
import { openApiModule } from "@questpie/openapi";

export default [adminModule, openApiModule()] as const;

The fetch handler stays the same — no wrapping needed:

src/index.ts
const handler = createFetchHandler(app, { basePath: "/api" });

// OpenAPI spec at /api/openapi.json
// Scalar UI at /api/docs

On this page