WebSocket manager for long-lived client/server connections with automatic reconnection, message queuing, and in-process messaging. Current stable version is 4.2.0. It supports WebSocket clients and servers, HTTP cross-posting for server-to-server communication, and local in-process messaging for testing. Key differentiators include peer authentication via URL path, TLS certificate registration, and unified API for WebSocket and HTTP transports. Suitable for browser extensions, unhosted web apps, and multi-agent systems.
npm install hubbieNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a local WebSocket server and client using Hubbie, demonstrating peer authentication and message exchange.
Pass reconnect options in client config (e.g., retryInterval).
Ensure peer is connected via peer event or addClient before send.
Use listen({ port }) or listen({ tls }) instead; passing existing server may cause POST handler conflicts.Upgrade Node.js to version 10 or later.
Use a single connection or implement ordering at application level.
Run 'npm install hubbie' and use 'const Hubbie = require('hubbie');'Use 'const Hubbie = require('hubbie');' or dynamic import with default extract.Call listen with an options object and optionally a callback: server.listen({ port: 8000 }, () => {});Ensure addClient includes mySecret matching server's expected secret.