Description
websocketd is a single binary that wraps any command-line program and serves it over a WebSocket. Your program reads lines from standard input and writes lines to standard output, and websocketd handles the connections. You do not need a library, a framework or a change to your code, and any language works, including Bash, Python, Ruby, Node, PHP, Perl, C and Go. Each browser that connects gets its own copy of the program, so connections are isolated and share nothing. The site describes the approach as CGI's idea applied to WebSockets. A development console lets you see every frame while you build, which you can open with a flag on the server. The site has a tutorial, examples in every language, documentation on the process model and downloads from GitHub releases. websocketd is by Joe Walnes.…
Highlights
- Turn any program into a WebSocket server
- No library or code changes
- One process per connection
- Works with any language
- Development console for frames
Ratings & Reviews
No ratings yet
Be the first to rate Websocketd.
People also visit
Websocketd FAQ
What is websocketd?
It is a single binary that serves a command-line program over WebSockets, so a browser can talk to the program line by line.
Do I need to change my program?
No. The site says there is no library or framework to add, and the program only reads stdin and writes stdout.
How are connections handled?
Each connection gets its own copy of the program, so the connections are fully isolated.
Can I see the messages while I build?
Yes. Start the server with the devconsole option and open the root URL in a browser to send and inspect frames.
What are the best Websocketd alternatives?
Popular alternatives to Websocketd include Websocket Devtools, WeTTY and Obs Websocket JS. See all Websocketd alternatives


