server code for mobile sdk