Skip to main content
Hono is Fetch-native, so toHonoHandler is a thin wrapper — it hands Hono’s Request straight to Corsair and returns the Response. The one route serves Hub delivery and the management API.

Configure Corsair

corsair.ts
import { createCorsair } from 'corsair';
import { github } from '@corsair-dev/github';

export const corsair = createCorsair({
    plugins: [github({ authType: 'managed' })],
    database: db,
    kek: process.env.CORSAIR_KEK!,
    hub: {
        projectApiKey: process.env.CORSAIR_DEV_API_KEY!,
        signingSecret: process.env.CORSAIR_DEV_SIGNING_SECRET!,
    },
});

Mount the route

index.ts
import { Hono } from 'hono';
import { toHonoHandler } from 'corsair';
import { corsair } from './corsair';

const app = new Hono();

// Wildcard: Corsair routes several paths under the base (delivery, connect,
// tenants). Match them all with `/*`, and keep basePath in sync with the mount.
app.all('/api/corsair/*', toHonoHandler(corsair, { basePath: '/api/corsair' }));

export default app;

Run and go green

Start the server and make one request. The app self-registers its delivery URL with Hub and the dashboard header dot turns green. Grey? The wildcard or basePath is off — both must be /api/corsair. See Delivery URLs.