build server and client