New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

ultimate-express-ws

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ultimate-express-ws

Similar to Express-WS functionality, but instead of using the traditional `WS` library on NodeJs, it's using Ultimate-WS (ie UWebsockets.js)

latest
npmnpm
Version
0.4.3
Version published
Maintainers
1
Created
Source

Ultimate-Express-WS (alpha)

Drop in replacement for Express-WS library in favour of Ultimate-WS over the traditional WS library.

Makes it easy to add Websocket Endpoints to your Express app while using uWebsockets under the hood through Ultimate-WS.

Checkout

  • Ultimate-WS [https://github.com/dimdenGD/ultimate-ws]
  • Ultimate-express [https://github.com/dimdenGD/ultimate-express]

*NOTE If you are already using bun, these libraries will fail (trust me lol)! You have to uninstall bun first and switch to Node JS for these libraries to work.

Main Changes:

  • leverages Ultimate-WS features
  • Type safety
  • Support Subprotocols (like Graphql) [untested]
  • Middleware support + Map Based route storage
  • added custom getRoutes() to view all Websocket endpoints (for debugging)

Installation

npm i ultimate-express-ws

Example With Ultimate-Express

const express = require("ultimate-express"); // or express 
const expressApp = express();
import handleWebsocket from '/services/handleWebsocket.ts'
import {UltimateExpressWS} from 'ultimate-express-ws'

// EXPRESSWS
// export const appInstance = ExpressWS(expressApp);

// Ultimate-Express-WS
export const appInstance = UltimateExpressWS(expressApp, undefined, 
 { 
    wsOptions: {
    perMessageDeflate: true,
    clientTracking: true,
    autoPong: true, 
  }
});
const app = appInstance.app

// Add your websocket endpoint
app.ws('/ws', handleWebsocket)

// appInstance.getRoutes() -- Lists all for your ws routes
// appInstance.getWss() -- the main WebSocket server
// appInstance.app - express app



** This is an early release so use it at your own risk **

FAQs

Package last updated on 31 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts