xantronix / tanzer Goto Github PK
View Code? Open in Web Editor NEWtänzer: THE Web Framework for Tcl!!!
License: MIT License
tänzer: THE Web Framework for Tcl!!!
License: MIT License
How to reproduce :
cd /tmp
git clone http://tanzer.io/git/tanzer.git
I copied the "scgi.tcl" from the example directory
cd tanzer
cp examples/scgi.tcl S
I added this at the begining:
lappend auto_path /tmp/tanzer/lib/
Starting the script:
./S 9000 /tmp
Then I have an Nginx server configured in SCGI mode
location / {
include scgi_params;
scgi_pass localhost:9000;
}
Testing with "curl http://localhost" produces the following error from the script:
{can't use empty string as operand of "+"} can't use empty string as operand of "+"
while executing
"expr {
2
+ $headerLength
+ [string length $headerLength]}"
(class "::tanzer::scgi::request" method "parse" line 31)
invoked from within
"$request parse buffer"
(class "::tanzer::session" method "handle" line 41)
invoked from within
"$session handle $event"
("uplevel" body line 2)
invoked from within
"uplevel 1 $script"
127.0.0.1 - [Wed, 04 Sep 2015 22:40:18 GMT] "- HTTP/1.1" 500 1610 "-" "(unknown)"
Hi Alexandra,
I'd like to use tanzer for dynamic webservices with manipulation at runtime. So it is necessary for me to delete and destroy route entries from router object.
Perhaps it is useful and you may add a delete method like this:
oo::define ::tanzer::router method delete {entry} {
my variable entries;
set entries [lreplace $entries [lsearch $entries $entry] [lsearch $entries $entry]]
$entry destroy
}
When I destroy an entry object i even got an error:
(bin) 12 % [$server router] entries
::oo::Obj62 ::oo::Obj63
(bin) 13 % [$server router] deleteEntry ::oo::Obj62
::oo::Obj63
(bin) 14 % ::oo::Obj62 destroy
invalid command name "{} *"
Best regards!
André
Need examples about how to use requests, please
If a HTTP POST that is longer than readsize (defined with tanzer::server::constructor) is sent, tanzer doesn't switch to the "write" state until the remote client closes the connection.
Hi, I am trying to figure how to integrate the websocket library of tcllib to Tanzer. I am using Tanzer and a websocket server using the websocket library of tcllilb on my framework FireTcl.
https://sourceforge.net/projects/firetcl/
There is almost no example on internet about how to use the websocket library of tcllib. The code of the websocket server that I use on my framework is here:
firetcl/tcl/websocket_server.tcl.
I use an object oriented approach.
I also made a very little modification to the websocket library of tcllib because otherwise it doesn't work:
firetcl/tcl/tcllib/websocket.tcl
I liked your framework. The code is clean.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.