1. 6
  1.  

  2. 2

    I think that this isn’t that interesting on its own–I have, however, been dying for a widget like the Travis-CI or Gitlab-CI realtime updating tails of a command line.

    Could this be extended to actually provide the view for seeing stdin in your browser? It seems less useful without that.

    1. 3

      This is covered in the examples section of the Github readme.

      1. 1

        However, it is a very basic example. It only displays a single line..

      2. 2

        It could totally be extended to do lots of things. Based on feedback I’ve gotten so far, I think it should do at least the following:

        1. Serve up a basic WebSocket handler which allows the code you write for this to do things like:

          (new Stream()).on(‘json’, function () {})

        or

          (new Stream()).on('line', function() {})
        
        1. Provide a default page that just views stdin as you suggested
        2. Provide a way to filter the input per client. So, when establishing a connection to /_ws you’d provide parameters filter=<pattern|keyword>
        3. Provide some other endpoints that do useful things, like perhaps some basic graphing of the data, or some other things.

        I created this so that I could use the browser to do some realtime visualization of what’s going on in a C program. I’ll pipe stdout to wipes and serve up my visualizations from the wipes web server using the data from the websockets. (This is the other reason it’s only line oriented data)