set up the server code