Runtimes
A LongHorn app runs on Node, Bun, Deno or Cloudflare Workers, using each platform's own server rather than a compatibility layer. To change host, you change one import and the last line of the app.
What changes between hosts
| Host | Import | Start with | Storage |
|---|---|---|---|
| Node | nodeRuntime from @longhornjs/node | app.listen(nodeRuntime) | SQLite, PostgreSQL, Redis |
| Bun | bunRuntime from @longhornjs/bun | app.listen(bunRuntime) | Native bun:sqlite |
| Deno | denoRuntime from @longhornjs/deno | app.listen(denoRuntime) | Built-in SQLite |
| Cloudflare Workers | createWorker from @longhornjs/workers | export default createWorker(app) | D1, Durable Object SQLite |
Limits to plan around
- Not every module runs everywhere. The runtime matrix lists exactly what was verified on each host.
- Workers owns sockets and lifetime, so you export a handler instead of listening. D1 uses predeclared batches, not callback transactions.
- There is no Worker scrypt provider yet, so password auth doesn't run on Workers.
- On Bun, SQL calls run synchronously.
- The complete console application is verified on Node with PostgreSQL only.
Versions checked
Shared packages were checked locally on Node 20.19.4, Bun 1.4.4, Deno 2.9.6 and workerd 1.20250718.0, on macOS ARM64. All 10 CI jobs have passed on hosted Ubuntu 24.04, which reaches all 66 gates. Nothing has run on Windows.