Tree over HTTP

Something quick and interesting I did the other day was write a random tree generator at West London Hack Night. We chose to do it in C, which was a change from the normal higher-level languages. I was quite pleased that we ended up with something fairly simple and elegant and got it done within the allotted time. You can see the results up to that point on GitHub.

Since we were “rendering” the tree by writing it to stdout as SVG and then opening it in a browser, it occurred to me that it might be fun to write it as a little web server. The server would serve trees over HTTP. Nothing else; just trees. No isomorphic JavaScript, no WebSockets, no Facebook Connect. Just a single executable with no special dependencies, and this is what you get:

A RESTful tree

Go to http://demo.jadex.org/tree to generate your very own tree. Every time is different; a (statistically) unique snowflake.

See the master branch for the latest version.

1 thought on “Tree over HTTP

Leave a Reply

Your email address will not be published. Required fields are marked *