The server side code for divenock