add webserver

This commit is contained in:
2025-01-15 23:38:39 +01:00
parent 7224111a0b
commit f9c4d3e2db
8 changed files with 3957 additions and 0 deletions

20
chatbug/ui/__main__.py Normal file
View File

@@ -0,0 +1,20 @@
from .server import start_server
from .serverwait import wait_for_server
from .ui import start_ui, _start_sandboxed
def start_ui():
svr = start_server(start_thread=False)
url = f"http://localhost:{svr.port}"
# wait_for_server(url)
# # start_ui(threaded=False)
# import webview
# w = webview.create_window('asdf', '../../web/index.html', min_size=(1200, 900), zoomable=True)
# webview.start(ssl=True)
if __name__ == "__main__":
start_ui()