init the server code