This is a dumb server written in twisted web.
If you run this, and make a request to the port specified in twistedfun-server.py (default 8888), it will attempt to serve up a page according to the following rules:
- If it matches
"../add20/<someinteger>"
, it will give a simple html page with the integer + 20 - If it matches
"../add20json/<someinteger>"
, it will give the same thing, but in JSON - It it doesn't match those two routes, it will attempt to serve up something from the public directory. If the route is
"../"
(a.k.a. root), it will serve index.html. - Anything else, it will serve up 404.html