Add server mode to server handler