diff --git a/mdproxy.py b/mdproxy.py
index a6600f0757049103e0d2543ea4bc3fd6a61ca517..790ed968d0fd85ba9ba30a7ac51ad8fb293bb9de 100755
--- a/mdproxy.py
+++ b/mdproxy.py
@@ -61,5 +61,5 @@ def serve(domain, eid):
     response.data = data
     return response
 
-
-app.run(host='127.0.0.1', port=5002)
+if __name__ == "__main__":
+    app.run(host='127.0.0.1', port=5002, debug=False)