Update app.py
Browse files
app.py
CHANGED
@@ -3,9 +3,12 @@ import os
|
|
3 |
import requests
|
4 |
import socket
|
5 |
|
|
|
|
|
|
|
6 |
def start_server():
|
7 |
os.system("uvicorn server:app --port 8080 --workers 2")
|
8 |
-
|
9 |
def is_port_in_use(port):
|
10 |
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
11 |
return s.connect_ex(('0.0.0.0', port)) == 0
|
@@ -17,4 +20,5 @@ def main():
|
|
17 |
start_server()
|
18 |
|
19 |
if __name__ == "__main__":
|
20 |
-
main()
|
|
|
|
3 |
import requests
|
4 |
import socket
|
5 |
|
6 |
+
os.system("uvicorn app:app --reload")
|
7 |
+
|
8 |
+
"""
|
9 |
def start_server():
|
10 |
os.system("uvicorn server:app --port 8080 --workers 2")
|
11 |
+
|
12 |
def is_port_in_use(port):
|
13 |
with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as s:
|
14 |
return s.connect_ex(('0.0.0.0', port)) == 0
|
|
|
20 |
start_server()
|
21 |
|
22 |
if __name__ == "__main__":
|
23 |
+
main()
|
24 |
+
"""
|