Skip to content

Commit ea82609

Browse files
committed
Update endpoint.py
1 parent 3e973d5 commit ea82609

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

endpoint.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import fastwsgi
2+
import socket
23
from backend import app
34
from multiprocessing import Process
45

@@ -7,5 +8,15 @@ def run_api_server():
78

89

910
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+
1021
api_process = Process(target=run_api_server)
1122
api_process.start()

0 commit comments

Comments
 (0)