implemented ServerMain, the class that launches the server.