This is the server code for JSPOS