'''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. ====== # Example of how to use httpd package require httpd 4.0 httpd::server create HTTPD port 8015 # Open our port HTTPD start # 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 {mixin {content reply.hello}} oo::class create ::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 } } ====== * [https://core.tcl.tk/tcllib/doc/trunk/embedded/www/tcllib/files/modules/httpd/httpd.html%|%Manual page] <> Tcllib | Web