server and client side code with configuration