aboutsummaryrefslogtreecommitdiff
path: root/client.py
diff options
context:
space:
mode:
Diffstat (limited to 'client.py')
-rw-r--r--client.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/client.py b/client.py
index 180335f..8c6cbec 100644
--- a/client.py
+++ b/client.py
@@ -1,5 +1,6 @@
+import os
import sys
import xmlrpc.client
-proxy = xmlrpc.client.ServerProxy("http://localhost:8000")
+proxy = xmlrpc.client.ServerProxy(f"http://localhost:{os.environ.get("PORT", 8000)}")
print("\n".join(proxy.search(sys.argv[1], sys.argv[2])))