Tin is a multi-threaded web server that supports both static and dynamic contents. It has a one-thread-multiple-active-clients architecture implemented using a thread-pool and handles large number of concurrent requests.
Tin is implemented with some goals in mind:
- Fast and responsive
- Ability to handle large number of concurrent requests
- Support Python frameworks well
make
or
gcc tin.c -o tin -pthread
Put index.html (default homepage), other pages and resources under the same directory. Then run:
./tin [port]
You will see requests coming in.
Put your CGI binary under cgi-bin directory and access it using
http://[your domain/ip address]:[port]/cgi-bin/[program]?[parameter1]&[parameter2]&[...]
For example, to run the adder cgi program that comes with Tin, go to:
http://[your domain/ip address]:[port]/cgi-bin/adder?1+2
Please consider contributing to our project and learn with us along the way!