server code walkthrough