Cloudflare

Bringing Node.js HTTP servers to Cloudflare Workers

Sep 8, 2025Yagiz Nizipli, James M Snell
Bringing Node.js HTTP servers to Cloudflare Workers
SummaryAI, from the source post

This post introduces the implementation of `node:http` client and server APIs within Cloudflare Workers. The `node:http` client APIs (`http.get`, `http.request`) are built on top of the `fetch()` API. For server APIs, a bridge system connects Node.js-style servers to the Workers request handling model using `handleAsNodeRequest` or `httpServerHandler`, allowing `http.createServer` executions to be registered and invoked via incoming fetch requests, identified by port numbers. This enables compatibility with Node.js frameworks like Express.js and Koa.js.

More from the Edge Computing with Cloudflare Workers trail