add webserver
This commit is contained in:
20
chatbug/ui/__main__.py
Normal file
20
chatbug/ui/__main__.py
Normal 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()
|
||||
|
||||
|
Reference in New Issue
Block a user