'''httpd''' is a package included in [Tcllib]. It implements a [TclOO] and [coroutine]-based HTTP server in pure Tcl. The project started as adapting `minihttpd.tcl` included with [TclHttpd] to use TclOO and coroutines. In the end it took on a life of it's own. The idea with the module is that it simply provides all of the plumbing that a developer would need to embed and HTTP listener implementation into his/her program. It's not a standalone web server. However, there is a standalone web server that is build on top of Httpd: [Toadhttpd]. ====== # Example of how to use httpd package require httpd 4.0 httpd::server create HTTPD port 8015 # Add in a dict based dispatcher HTTPD plugin dispatch ::httpd::plugin.dict_dispatch # Register the /hello uri to be answered by our new class HTTPD uri add * /hello [list mixin {content reply.hello}] clay::define ::reply.hello { method content {} { my puts "My Example Server" my puts "

Hello World!

" my puts "Nice to see you from [my request get REMOTE_HOST]" my puts "The time is now [clock format [clock seconds]]" my puts } } # If not in interactive mode vwait forever ====== * [https://core.tcl.tk/tcllib/doc/trunk/embedded/www/tcllib/files/modules/httpd/httpd.html%|%Manual page] * [Toadhttpd] - A project that extends this module into a fully working web server <> Tcllib | Web