Implement routing

I also made the hello world example more sophisticated, demonstrating
JSON responses and routes.