nodejs-websocket is a minimal WebSocket server and client library for Node.js, current stable version 1.7.2. It provides a simple API for creating WebSocket servers and clients with support for text and binary frames. Released on a low cadence (last update 2019), it focuses on lightweight implementation over full RFC compliance. Unlike ws or socket.io, it lacks automatic reconnection, compression, and extensive protocol support. It uses Node's net/tls modules and is suitable for basic WebSocket use cases.
npm install nodejs-websocketNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a WebSocket server that echoes uppercase text, and a client that connects and sends a message.
Use conn.on('text', handler) instead of conn.on('message', handler).Use conn.sendText(str) or conn.sendBinary(buffer) explicitly.
Consider migrating to 'ws' or 'uWebSockets.js' for active maintenance and security fixes.
Implement custom ping/pong or use a library like 'ws' which supports it natively.
Run 'npm install nodejs-websocket' in your project directory.
Replace 'conn.send(str)' with 'conn.sendText(str)'.
No dependency data recorded yet.