Code for the Sinatra server that implements http://web-apprentice-demo.craic.com