hookone
v0.2.0
Published
CLI tool to forward WebSocket messages to localhost
Maintainers
Readme
Hookone
A CLI tool that connects to a WebSocket server and forwards incoming messages to your localhost server.
Installation
npm install -g hookoneOr run directly with npx:
npx hookone 3000 a9a34cc8Usage
hookone <port> <id>port- The localhost port your server is running onid- Your unique identifier for the WebSocket connection
Example
hookone 3000 a9a34cc8This will:
- Connect to the WebSocket server
- Register with ID
a9a34cc8 - Forward any incoming requests to
http://localhost:3000 - Send responses back to the WebSocket server
Features
- 🔄 Automatic reconnection with exponential backoff (1s → 2s → 4s → max 30s)
- 🎨 Colored terminal output for easy reading
- 📝 Request and response logging
- 👋 Graceful shutdown on Ctrl+C
- ⚡ Supports all HTTP methods (GET, POST, PUT, PATCH, DELETE)
License
MIT
