Serverside Code for the Tapp Application