Skip to content
Webhooks SDK
Esc
↑↓navigate↵open⌘Jpreview

Bare Node

toNodeHandler for node:http servers, plus building blocks for frameworks with their own request type.

For node:http servers and anything built on them:

import { createServer } from 'node:http'
import { toNodeHandler } from 'webhooks-sdk/node'

const server = createServer(toNodeHandler(handler))

The module also exports the building blocks — readRawBody(request) and fromNodeRequest(request, rawBody?) — if you’re wiring into a framework with its own request type. None of it pulls in @types/node, so your own type setup stays untouched.

Last updated on September 1, 2026

Was this page helpful?