Skip to content
Eugene Lazutkin edited this page Aug 8, 2026 · 6 revisions

double-meh-bundler ://

Node.js CI NPM version

double-meh-bundler is the server side of the double-meh bundle protocol: it accepts one bundled request (many GETs riding a single PUT), fans out to your services on the backend network, and returns every response in a single compressed envelope — or streamed part-by-part when the client asks for the +jsonl framing. The core is a web-standard fetch handler — it runs on Bun.serve, Deno.serve, service workers, and web-handler frameworks; callback servers are one dependency-free adapter away.

import {createBundler} from 'double-meh-bundler';

const bundler = createBundler({
  isUrlAcceptable: url => url.startsWith('/api/'), // required — the security boundary
  resolveUrl: url => new URL(url, 'http://api.internal:8080').href
});

Bun.serve({fetch: bundler});

Search

🔍 Search this wiki — ranked, deep-linked search via wiki-search; install the bookmarklet to search in place. Fallback: GitHub wiki search.

Why bundle

  • Compression locality — many small JSON responses share one compression window: measured ~40–48% fewer bytes on bursts of small responses, ~16–22% on medium ones.
  • Cross-origin aggregation — one bundler origin fans out to any backend service; HTTP/2 multiplexing is per-origin and structurally cannot.
  • HTTP/1.1 paths — origins without an h2 edge also recover the classic connection-cap win.

The client keeps per-request semantics intact through bundling: per-URL caching, ETag/304 revalidation, retry, and per-request errors — see double-meh's bundle transport.

Documentation

API

Protocol

  • Wire format — the v1 envelope, part rules, error mapping

Project

🔍 Search the wiki

double-meh-bundler

Start

API

Protocol

Project

Clone this wiki locally