Ultimate WS is a drop-in replacement for the 'ws' WebSocket library, built on top of uWebSockets.js for significantly higher performance. Current stable version is 2.0.9, released with an active maintenance cadence. Key differentiators include: same API as 'ws' but ~3.7x higher send rate in benchmarks, seamless integration with Ultimate Express, support for stand-alone server, existing uWS server, and HTTPS. Requires Node.js >=20. Ships TypeScript definitions. It is useful for projects wanting to migrate from 'ws' to uWebSockets without changing code, or for those using Ultimate Express for HTTP upgrades.
npm install ultimate-wsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a standalone WebSocket server on port 3000 that echoes incoming messages.
Use new WebSocketServer({ server: ultimateExpressApp })Upgrade Node.js to version 20 or later.
Use a browser WebSocket or 'ws' client for client connections.
Pass an existing server (uWS app or Ultimate Express app) via 'server' option.
Ensure your platform is supported by uWebSockets.js (Linux, macOS, Windows) and have build tools installed.
Install build-essential (Linux) or Visual Studio Build Tools (Windows). Alternatively, use a prebuilt binary.
Use const { WebSocketServer } = require('ultimate-ws') or named ESM import.Choose a different port or kill the process using the port.
Run 'npm install ultimate-ws'