a simple tool for piping things into a websocket
it keeps an in-memory buffer of sent information and replays it when new clients connect
npm install --global wsl
cat file.txt | wsl
node index.js | wsl --port 3033
by default, wsl
broadcasts on port 43110
(i.e. port hello).
var ws = new WebSocket('ws://localhost:43110')
ws.onmessage = function(e){
console.log(e.data)
}
~/P/s/wsl ❯ wsl --help
Options:
--help Show help [boolean]
--version Show version number [boolean]
--binary Pipe contents as binary websockets [boolean]
--port Listen on particular port [default: 43110]
well there aren't any yet but this is meant to make them easy to make