-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathrun_web.py
More file actions
35 lines (28 loc) · 891 Bytes
/
run_web.py
File metadata and controls
35 lines (28 loc) · 891 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python3
"""
StepFly Web Dashboard Launcher
Simple launcher script for the web interface with auto browser opening
"""
import sys
import os
import webbrowser
import time
import threading
# Add project root to path
project_root = os.path.dirname(os.path.abspath(__file__))
if project_root not in sys.path:
sys.path.insert(0, project_root)
# Import and run the web UI
from ui.web_ui_run import main
def open_browser(delay=2):
"""Open browser after a short delay to allow server to start"""
time.sleep(delay)
webbrowser.open("http://localhost:8080")
if __name__ == "__main__":
# Start browser opening in background thread
browser_thread = threading.Thread(target=open_browser)
browser_thread.daemon = True
browser_thread.start()
print("🌐 Web dashboard will open at: http://localhost:8080")
# Run the web server
main()