> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Hono

> Mount the Corsair /api/corsair route in a Hono app.

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

```ts corsair.ts theme={null}
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

```ts index.ts theme={null}
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](/hub/delivery-urls).
