pipe-to-websocket

Pipe stdout to websocket server

Usage no npm install needed!

<script type="module">
  import pipeToWebsocket from 'https://cdn.skypack.dev/pipe-to-websocket';
</script>

README

pipe-to-websocket | Build Status Coverage Status

Description:

Takes the standard input and pipes it to websocket to be used

Install:

npm install -g pipe-to-websocket

Usage:

tail -f /var/log/nginx/error.log | p2w

Config

Default port that websocket listens to is 8090 but can be configured as

tail -f /var/log/nginx/error.log | SOCKET_PORT=8088 p2w

Example:

A client example is in client/index.html showing how to use it.