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

# Deploy on Node.js

> Run Redop on a long-lived Node.js process with the Node adapter.

`.listen()` defaults to Bun. When you need Node specifically, use `@redopjs/redop/node`.

## Quick start

```ts theme={null}
import { Redop } from "@redopjs/redop";
import { listenNode } from "@redopjs/redop/node";

const app = new Redop({
  serverInfo: { name: "node-mcp", version: "0.1.0" },
}).tool("ping", {
  handler: async () => ({ ok: true }),
});

listenNode(app, {
  port: Number(process.env.PORT ?? 3000),
  hostname: "0.0.0.0",
  health: true,
  onListen: ({ url }) => console.log(`Redop on ${url}`),
});
```

## Other Node shapes

* `nodeListener(app)` / `toNodeHandler(app)` — attach to an existing `node:http` server
* `nodeFetch(app)` — portable `(Request) => Response` for undici-style hosts

## Notes

* Node is a long-lived runtime, so `afterResponse` uses microtasks (same model as Bun).
* Sessioned MCP and SSE work the same as the Bun HTTP transport on a single process.
* For Cloudflare or Vercel, use `cloudflare(app)` or `vercel(app)` instead of the Node listener.

## Next

* [Deploy to Production overview](/docs/guides/deploy/index)
* [Runtime adapters reference](/docs/reference/runtime-adapters)
