Skip to content

Commit bed92bb

Browse files
committed
address pr reviews
1 parent 4012416 commit bed92bb

File tree

1 file changed

+1
-1
lines changed
  • src/content/docs/workers/runtime-apis/nodejs

1 file changed

+1
-1
lines changed

src/content/docs/workers/runtime-apis/nodejs/http.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ export default httpServerHandler({ port: 8080 });
198198
The `httpServerHandler` function integrates Node.js HTTP servers with the Cloudflare Workers request model. When a request arrives at your Worker, the handler automatically routes it to your Node.js server running on the specified port. This bridge allows you to use familiar Node.js server patterns while benefiting from the Workers runtime environment, including automatic scaling, edge deployment, and integration with other Cloudflare services.
199199

200200
:::note
201-
Failing to call `close()` on an HTTP server may result in the server being leaked. To prevent this, call `close()` when you're done with the server, or use explicit resource management:
201+
Failing to call `close()` on an HTTP server may result in the server persisting until the worker is destroyed. In most cases, this is not an issue since servers typically live for the lifetime of the worker. However, if you need to create multiple servers during a worker's lifetime or want explicit lifecycle control (such as in test scenarios), call `close()` when you're done with the server, or use explicit resource management:
202202

203203
```js
204204
import { createServer } from 'node:http';

0 commit comments

Comments
 (0)