httcld - Micro-HTTP server with embedded TCL
httcld is a very small HTTP server with an embedded Tcl (https://www.tcl-lang.org/ ) interpreter. In addition to static .html files, it serves .htcl files, which are HTML with embedded Tcl code. The Tcl is executed on the server, and the resulting output is embedded in the stream sent back to the client. In addition, variables in the Tcl namespace may be set and retrieved directly, say by an AJAX script.
The idea for this server came out of a need to have a flexible, fast, but very lightweight backend to support a GUI on an embedded platform. I also wanted efficient support for a more dynamic AJAX-like interface, but the existing backends were much too big for the box. Apache and its modules took too much memory and storage space, Ruby and Rails likewise. Java was right out.
Thus was born the idea of a specialized HTTP server that could update a very dynamic UI without any more CPU overhead than necessary. Along the way, I decided that it would be nice if I could make the web pages in the UI smarter. This led to the embedded .htcl format.
httcld requires 2 external libraries:
http://www.gnu.org/software/libmicrohttpd Version 0.4.0pre1
https://www.tcl-lang.org Tcl Version 8.5