A lightweight Node.js library for managing internal and external WebSocket connections, version 2.0.18. Provides a unified interface for creating and managing WebSocket servers and clients with automatic reconnection, event handling, and connection pooling. Differentiates from raw ws or Socket.IO by focusing on simple manager patterns for multi-connection scenarios, with support for both server and client sides out of the box. Minimal dependencies and TypeScript support planned or experimental.
npm install websocket-managerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Demonstrates server creation, client connection, and connection management with WebSocketManager.
Use import statements and ensure your project is ESM (type: 'module' in package.json).
Replace manager.addConnection('name', ws) with manager.add('name', ws).Upgrade to >=2.0.10 or call server.listen() after creation.
Switch to import syntax or use dynamic import().
Use import { WebSocketManager } from 'websocket-manager' instead of import WebSocketManager from 'websocket-manager'.Choose a different port or close existing server before starting.