整理项目文件分类

This commit is contained in:
Codex committed 2026-05-20 20:49:19 +08:00
1 parent 38e2b399d4
commit 1fdec7a548
20 files changed
+35 -13

No files matched your search

+41
View File
@@ -0,0 +1,41 @@
import sys
import os
import time
import subprocess
import threading
# Add project root to path
project_root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if project_root not in sys.path:
sys.path.insert(0, project_root)
import gui.web_gui as wg
def test_server():
# Start server in background thread
def run_server():
try:
wg.main()
except SystemExit:
pass
server_thread = threading.Thread(target=run_server, daemon=True)
server_thread.start()
# Wait for server to start
time.sleep(2)
# Test API
try:
import requests
response = requests.get('http://localhost:8001/api/config', timeout=5)
print(f"Status: {response.status_code}")
print(f"Response length: {len(response.text)}")
data = response.json()
print(f"Config keys: {len(data)}")
print(f"Sample keys: {list(data.keys())[:5]}")
except Exception as e:
print(f"Error: {e}")
if __name__ == "__main__":
test_server()