Turn any application that uses STDIN/STDOUT into a WebSocket server.
Last updated 6 years ago by asbjornenge .
BSD-2-Clause · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install websocketdjs 
SYNC missed versions from official npm registry.


Shameless theft of websocketd, written in javascript.

Why? I needed some looser security. Didn't want to wait. Didn't want to write any Go. And it's like 50 lines of code... Prolly don't handle most edges :-P Please PR.

How it works

It works very similar to websocketd. For each new established connection it will spawn a child of the supplied process. Any stdout and stderr from that child will be sendt to the connecting client. And any data sendt from the client will be piped to stdin of the child process.


npm install -g websocketdjs


websocketdjs --port 8080 tail -f /var/log/nginx/access.log


var ws = new WebSocket('ws://localhost:8080/')
ws.onmessage = function(event) { console.log(event.data); }
// --> nginx logs


Current Tags

  • 0.0.2                                ...           latest (6 years ago)

2 Versions

  • 0.0.2                                ...           6 years ago
  • 0.0.1                                ...           6 years ago
Maintainers (1)
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (3)
Dev Dependencies (0)
Dependents (2)

Copyright 2014 - 2016 © taobao.org |