websocketd

Turn any CLI program into a WebSocket server

brewmacoslinux
Try with needOr install directly
Source

About

WebSockets the Unix way

Commands

websocketd

Examples

Start a WebSocket server wrapping a simple echo command on port 8080$ websocketd --port=8080 cat
Create a WebSocket server that executes a bash script for each connection$ websocketd --port=9000 ./my_script.sh
Run a WebSocket server with a specific host binding and custom handler$ websocketd --host=localhost --port=8000 sh -c 'echo "Hello from WebSocket"'