Toolatra is a modern Sinatra-like micro web framework for writing HTTP Tcl web applications.
app.tcl code:
#!/usr/bin/env tclsh package require Toolatra get / { render {Hello world!} } get /+name { render "Hello, [dict get $params name]!" } post / { if {$rawData != {}} { render "Hello, $rawData (via POST request)!" } else { render {Hello world (via POST request)!} } } run
How to run:
$ tclsh8.5 app.tcl
The app will be running at http://localhost:5050
Both the current and the previous version of Cat Language Translator are written 100% in Tcl and Toolatra. The source code of the first version can be found here: https://github.com/timkoi/catlanguage-web
Toolatra git repo: https://github.com/timkoi/toolatra Bug tracker: https://github.com/timkoi/toolatra/issues