

Show HN: Wipes – pipe stdin to your browser over websockets - apgwoz
https://github.com/apg/wipes

======
jzwinck
I did something related, but by running a command repeatedly like Unix
watch(1):
[https://github.com/jzwinck/wswatch](https://github.com/jzwinck/wswatch)

------
tedchs
Nice project. How does buffering work? Does it queue input lines until a
browser connects to the websocket server? If multiple browsers are connected,
will it broadcast all stdin lines to all connections?

It's not clear to me from the README whether I need to write my own HTML/JS to
consume the websockets data. Does it maybe serve a minimal HTML page by
default?

As feedback, I agree with other commenters that it would be better to make
file serving an explicit option instead of default enabled.

~~~
apgwoz
It throws away the data if there are no consumers. This probably isn't the
best idea, but it's simplest. I'll think a bit about alternatives.

And,at this point you need to write your own consumer. The project started
because I want to do some real-time visualization from a program written in C.
There's a switch which turns on verbose metrics which I can then pipe to
wipes.

~~~
tedchs
Got it. You mind find that wipes would be more similar to other tools that
read from STDIN (cat, tail, etc.) if it implements "back pressure" by not
reading from STDIN until it has an output to write to. To the user it would
appear that wipes is blocking on receiving a websocket connection.

------
voltagex_
I'm not sure I like it serving files from the current directory by default -
maybe with an extra flag instead?

~~~
apgwoz
This isn't meant to be a tool for production usage. It's meant to be a quick
"I need to pipe this data into the browser quick for testing / visualization."

Though, I am curious -- why do you dislike "." by default?

------
est
I am sure I saw similar tool months ago on HN. Someone commented that it looks
like inetd in disguise.

~~~
apgwoz
You probably mean websocketd? Yes, this is really quite similar, but also much
simpler.

------
sheetjs
> Show HN: Wipes – pipe sdtin to your browser over websockets

"sdtin" should be "stdin"

~~~
apgwoz
Whoops! Thanks moderators!

