Because you need to implement a tiny HTTP server for WebSockets anyway (if you want't them to work from browsers). So, adding the ability to serve static files on top of that is trivial.
That indeed was a dilemma. Although it focusses on doing one thing well, there were also a few core things that are useful to support a websocket based app - namely a place to serve the actual web content from (static) and the ability to use websocketd using vanilla http instead of websockets (cgi).
Comments (140) 32 threads
Earlier commentsSo why does this WebSocket daemon also serve static files and CGI applications?
Not sure why they added CGI, though.
Just some good old fashioned hand written HTML + CSS. https://github.com/joewalnes/websocketd/tree/gh-pages
WebSockets are message-based. UNIX streams are not.
All comments shown.
Couldn't load more comments. Check your connection and try again.