toNodeHandler
function toNodeHandler(fetch, options?): (req, res) => void;Defined in: src/adapters/node.ts:225
Wrap a fetch handler as a node:http request listener.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
fetch |
FetchHandler |
options? |
NodeHandlerOptions |
Returns
Section titled “Returns”(req, res) => void
Example
Section titled “Example”import { createServer } from "node:http";createServer(toNodeHandler(panel.fetch)).listen(3000);