Node Runtime and ESM
Runtime contract
Section titled “Runtime contract”- This package targets a Node.js runtime, not the browser.
- The published package is ESM-first. Use
import, notrequire. - The callback helper uses
node:httpprimitives and is designed for Node servers or Node-compatible frameworks.
Good fits
Section titled “Good fits”- Express, Fastify, Koa, Hono on Node
- Plain
node:httpservers - Background workers, cron jobs, or queue consumers running in Node.js
Not a fit
Section titled “Not a fit”- Browser bundles
- Edge runtimes without full Node compatibility
- Environments where
Bufferand Node request handlers are unavailable
Framework note
Section titled “Framework note”If you already have a web framework, prefer the parsing helpers and mount them inside your existing routes. Use the standalone callback handler when you want the SDK to own the basic request parsing for a small service.