assigns a handler to the server