Adds flask code for the server