WebSocket proxy that forwards HTTP POST requests to connected WebSocket clients. Version 2.2.0 is the latest stable release. Useful for testing and mocking WebSocket integrations by converting simple HTTP POST calls into WebSocket broadcasts. Lightweight, zero-config CLI tool with optional SSL support. Differentiates from full WebSocket mocking libraries by focusing on the HTTP-to-WebSocket bridge pattern with minimal setup.
npm install wsprNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Installs wspr globally, starts the proxy, and demonstrates broadcasting a JSON message via HTTP POST to all connected WebSocket clients.
Modify the source code or use a reverse proxy to bind to 0.0.0.0 if remote access is required.
Use POST method with a request body (string or JSON) to the HTTP endpoint.
Use a trusted certificate authority or use wss with valid certificates.
Run 'npm i -g wspr' and ensure npm global binaries are in your PATH.
Kill the process on that port (e.g., lsof -ti:3005 | xargs kill) or modify wspr source to use a different port.
Start wspr in a terminal. Ensure no firewall rules block the port.
No dependency data recorded yet.