The Durable Streams protocol server on Node, built on the portable
@humanlayer/durable-streams-effect-server-core. It
serves the core routes over @effect/platform-node's NodeHttpServer, backed
by the in-memory shared-store StreamRegistry (the same substrate model a
filesystem/Postgres host would use — one process, many streams, a per-key view
over shared state; an FS-backed StreamStore can be swapped in without touching
the core).
src/
server.ts makeNodeServer({ port, longPollTimeoutMillis }) → the wired Layer
main.ts entrypoint (reads PORT, LONG_POLL_TIMEOUT_MS), NodeRuntime.runMain(Layer.launch(...))
bun run start # serves on :8788 (PORT, LONG_POLL_TIMEOUT_MS env)
bun run check # typecheck
bun run conformance # start the server + run the vendored conformance suiteThe substrate Layers swapped in versus the Durable Object host:
| Service | Node Layer |
|---|---|
StreamStore |
in-memory Map per key (shared store) |
StreamMutex |
per-stream Semaphore(1) |
StreamHub |
in-proc PubSub per key |
ExpiryScheduler |
no-op (lazy expiry on access) |
ForkPeer |
local store of the source key |
StreamRegistry |
per-key views over the shared global state |
Conformance: 326 / 326 passing (6 skipped = opt-in metadata subscriptions).