Hono, Node.js and Bun
Mount Upserve in an existing Hono app or run its Fetch handler in your runtime.
createUpserve() returns a Hono application. You can use its Fetch handler directly or mount it in another Hono app. The library doesn't start a server, open a database or create timers on its own.
Hono on Node.js
npm install hono @hono/node-server @neplex/upserve @neplex/upserve-github @neplex/upserve-genericimport { Hono } from "hono";
import { serve } from "@hono/node-server";
import { createUpserve } from "@neplex/upserve";
import { github } from "@neplex/upserve-github";
import { generic } from "@neplex/upserve-generic";
const updates = createUpserve({
apps: {
editor: {
provider: github({ repository: "owner/editor" }),
adapters: [generic()],
},
},
});
const app = new Hono();
app.get("/", (context) => context.text("Editor service"));
app.route("/updates", updates);
serve({ fetch: app.fetch, port: 3000 });npx tsx server.ts
curl http://localhost:3000/updates/editor/stable/generic/channelsReturned asset URLs retain /updates. For a dedicated Node.js listener, pass updates.fetch to serve() directly, as in the quick start. See Hono's Node adapter guide for server options.
Bun
Install the core, GitHub and generic packages; Bun supplies the HTTP server, so you don't need @hono/node-server.
bun add @neplex/upserve @neplex/upserve-github @neplex/upserve-genericimport { createUpserve } from "@neplex/upserve";
import { github } from "@neplex/upserve-github";
import { generic } from "@neplex/upserve-generic";
const updates = createUpserve({
apps: {
editor: {
provider: github({ repository: "owner/editor" }),
adapters: [generic()],
},
},
});
Bun.serve({ port: 3000, fetch: updates.fetch });bun run server.bun.ts
curl http://localhost:3000/editor/stable/generic/channelsOther Fetch-based runtimes
The core uses Fetch, Web Crypto, AbortSignal and Web Streams rather than Node APIs. A Fetch host can call updates.fetch(request). The repository includes a Worker integration example, but it hasn't been deployed and validated on Cloudflare. Treat it as a starting point to test in your own environment, not a claim of verified production compatibility.
Without background, expired-cache requests await refresh and don't depend on work continuing after the response. Hosts with a waitUntil() facility can pass a callback as background: (task) => context.waitUntil(task) when creating Upserve in the appropriate request scope. Don't capture an expired request context in a long-lived instance. Constructing a new instance per request also loses process-local coalescing between requests; choose your lifecycle deliberately.
SQLite and the standalone CLI are Node-specific. Use memory or a custom cache store in other runtimes.
What is validated
The repository's runtime smoke script exercises built package entry points on Node.js and Bun. Protocol tests use the Hono Fetch handler directly. This doesn't prove installation behavior on every desktop OS, a Workers deployment or every serverless host.
When embedding, you own listener shutdown, logs and health routes. The CLI's /health/* endpoints aren't added to the core application. See standalone deployment if you want those lifecycle features included.