Update mock_mcp_servers/run_servers.py
Browse files
mock_mcp_servers/run_servers.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import uvicorn
|
2 |
-
import
|
3 |
|
4 |
def run_github_server():
|
5 |
uvicorn.run("mock_mcp_servers.github_server:app", host="127.0.0.1", port=8001, log_level="info")
|
@@ -8,11 +8,11 @@ def run_sandbox_server():
|
|
8 |
uvicorn.run("mock_mcp_servers.sandbox_server:app", host="127.0.0.1", port=8002, log_level="info")
|
9 |
|
10 |
if __name__ == "__main__":
|
11 |
-
|
12 |
-
|
13 |
|
14 |
-
|
15 |
-
|
16 |
|
17 |
-
|
18 |
-
|
|
|
1 |
import uvicorn
|
2 |
+
import threading
|
3 |
|
4 |
def run_github_server():
|
5 |
uvicorn.run("mock_mcp_servers.github_server:app", host="127.0.0.1", port=8001, log_level="info")
|
|
|
8 |
uvicorn.run("mock_mcp_servers.sandbox_server:app", host="127.0.0.1", port=8002, log_level="info")
|
9 |
|
10 |
if __name__ == "__main__":
|
11 |
+
t1 = threading.Thread(target=run_github_server)
|
12 |
+
t2 = threading.Thread(target=run_sandbox_server)
|
13 |
|
14 |
+
t1.start()
|
15 |
+
t2.start()
|
16 |
|
17 |
+
t1.join()
|
18 |
+
t2.join()
|