What | jimhttp (name subject to change) |
Where | https://github.com/dbohdan/jimhttp |
Description | A web microframework prototype meant to be like Sinatra and Flask written in pure Jim Tcl. Provides a rough implementation of the HTTP protocol as well as routing, templates, JSON generation and parsing, an HTML DSL and persistent storage powered by SQLite3. |
Platforms | Likely all supported by Jim Tcl's aio . |
Prerequisites | The latest Jim Tcl from the Git repository . The current stable release (Jim Tcl 0.75) won't do. |
Updated | 09/2014 |
License | MIT |
source http.tcl http::add-handler GET /hello/:name/:town { return [http::make-response \ "Hello, $routeVars(name) from $routeVars(town)!"] } http::start-server 127.0.0.1 8080
ekd123 - 2014-09-30 08:04:39
Will there be a "tclhttp" written in Tcl?
dbohdan 2014-09-30: It's not a goal for me for now (especially since there are already web frameworks for Tcl) but I would welcome a compatibility patch that would make the code work in both. Porting should be pretty straightforward except for the use of static variables (though those can be emulated with namespaces, e.g, static variable varName to $procName::$varName).