NODE.JS
Node.js 22+
Use the Node.js R2 and D1 adapters. The R2 adapter uses the AWS S3 SDK.
Node.js setup →R2D1 / TYPESCRIPT
Use one R2D1 collection API on Node.js or Cloudflare Workers. R2 stores complete documents; D1 stores a rebuildable index.
The package provides separate adapters for Node.js and Cloudflare Workers.
Use the Node.js R2 and D1 adapters. The R2 adapter uses the AWS S3 SDK.
Node.js setup →Use Workers R2 and D1 bindings. Core and Workers adapters do not import Node.js modules.
Workers setup →Install R2D1 from npm, then choose the adapter for your runtime.
npm install @nexcraft-dev/r2d1R2 keys, D1 schema, and cursors follow the Java contracts. Document bytes use your codec. JSON is an explicit option, not a default format.
Read the TypeScript guide →