node:http and the request/response objects it hands you. toNodeHandler takes the corsair instance and returns a (req, res) function you can drop straight into createServer, or mount behind a path check on a server you already run. It reads the raw request stream itself, so there’s nothing to parse first. This is the right level for scripts, workers, and tiny services where pulling in Express would be the only dependency.
Install
The adapter ships in corecorsair, with nothing extra for node:http. Add a plugin package per service you integrate (@corsair-dev/github, and so on).
Create the instance
Build the instance once. The handler and your read/write code both import it.corsair.ts
.db / .api call on this page import this corsair. multiTenancy: true is what makes corsair.withTenant(id) available, and a tenant.github.* call resolves to the github() entry here. Add a service by installing its @corsair-dev/* package and dropping it into plugins. Database choices and the Hub keys are in Quick Start.
Mount the handler
server.ts
./corsair is your createCorsair({ ... }) instance. See Getting Started if you haven’t built it yet. Already have a server? Mount it behind a path check instead: if (req.url?.startsWith('/api/corsair')) return handler(req, res).
Read and write
You call Corsair the same way everywhere; the only Node-specific part is serializing the result yourself. Here’s a bare JSON endpoint that reads open issues from.db (no network, no rate limit) and opens a new one through .api:
issues.ts
Connect a tenant
There’s no React here, so use the vanilla client from a script, a worker, or a non-React frontend that talks to your server.1
Create the client
corsair-client.ts
createCorsairClient is a typed fetch wrapper over the management API, no React required. Use it from your frontend, a worker, or a script. Every route is typed against its response. Full surface on the Vanilla Client reference.2
Read what's connected
connections.ts
connectionStatus.get returns a map of plugin id to connected | missing_credentials | not_connected, so you can show what’s live and what still needs connecting.3
Mint a connect link
connect.ts
"github" for any plugin you configured.Go green
Start the server:/api/corsair registers your delivery URL with Hub and turns the App sync dot in the dashboard header green.
Next
Vanilla client
Every management-API method, fully typed.
Prefer a router?
Express and Hono both run on Node with a one-line adapter.
Connect / OAuth
The full connect flow, error codes, and retry.
Multi-tenancy
One flag and every user gets their own data and credentials.