Add Custom Code to Tclhttpd

Tclhttpd supports a custom code library, which is a directory where you can put Tcl scripts that are loaded upon startup. The distribution includes a couple of samples in the custom directory.

You start the server like this:

 tclsh8.3 bin/httpd.tcl -port 8000 -library my_custom_code_directory -docRoot my_htdocs

It start the server (on port 8000) with the home page inside my_htdocs. After the core server is initialized it will source all the files in the my_custom_code_directory. This code can add new URL domains, document handlers, etc. etc.


Updated on 6 Aug 2003, 14:26 GMT
Search - Recent Changes - Reference - Index - Go to Beedub's Wiki - Help