hub-deno-minimal
The minimal Deno host for @devframes/hub: one initHub() call served through Deno.serve, the UI supplied by @devframes/hub-ui.
Package: hub-deno-minimal · framework: Deno
What it shows
initHub({ base, devframes, ui: createUi() })insrc/hub.ts, memoized onglobalThis. No transport option, so the entry wires the socket itself.Deno.serve(options, handler)serves HTTP (webRequest→Response), and the whole namespace flows throughhub.handler(request).- WebSockets arrive as fetch upgrades, so
src/server.tsbinds Deno's transport withcreateContextRpcServer+attachDenoWsTransport(crossws' Deno adapter) and answers${hub.base}__wson the app's own origin. crossws attaches the socket to theResponseitshandleUpgradereturns, so there is no separatewebsockethandler object.
Run it
sh
pnpm install
pnpm --filter hub-deno-minimal dev