We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e973d5 commit ea82609Copy full SHA for ea82609
endpoint.py
@@ -1,4 +1,5 @@
1
import fastwsgi
2
+import socket
3
from backend import app
4
from multiprocessing import Process
5
@@ -7,5 +8,15 @@ def run_api_server():
7
8
9
10
if __name__ == "__main__":
11
+ hostname = socket.gethostname()
12
+ ip_address = socket.gethostbyname(hostname)
13
+ site_config = {
14
+ 'host': '0.0.0.0',
15
+ 'port': 1337,
16
+ 'debug': False
17
+ }
18
+ print(f"Running on http://127.0.0.1:{site_config['port']}")
19
+ print(f"Running on http://{ip_address}:{site_config['port']}")
20
+
21
api_process = Process(target=run_api_server)
22
api_process.start()
0 commit comments