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

# Express

> Mount the Fetch-compatible Hookfish handler in an Express 5 application.

The Hono Node adapter translates Express requests and responses into the Fetch
model used by Hookfish. Your broker configuration and API remain unchanged.

## Install dependencies

```bash theme={null}
pnpm add @hookfish/api @hookfish/database @hookfish/providers @hono/node-server express
```

Create `hookfish.config.ts` using the [Hono guide](/frameworks/hono), then mount
the handler before middleware that consumes `/api` request bodies.

```ts theme={null}
import { getRequestListener } from '@hono/node-server'
import { HookfishServer } from '@hookfish/api'
import express from 'express'
import config from '../hookfish.config'

const hookfish = await HookfishServer.init(config)
const handleHookfish = getRequestListener((request) =>
  hookfish.fetch(request, process.env),
)

const app = express()

app.use((request, response, next) => {
  if (request.path.startsWith('/api/')) {
    void handleHookfish(request, response).catch(next)
    return
  }
  next()
})

app.listen(3000, '127.0.0.1')
```

Verify the mount by opening `http://127.0.0.1:3000/api/docs` or requesting
`/api/openapi.json`.

<Warning>
  Do not place a static directory, proxy, JSON body parser, or catch-all route
  in front of Hookfish's `/api` paths.
</Warning>
