From 599a1ea2ccb21e47be73de6286e7561ea82fa45c Mon Sep 17 00:00:00 2001 From: Alexey Olendor <137941487+Lolendor@users.noreply.github.com> Date: Thu, 25 Dec 2025 07:45:21 +0300 Subject: [PATCH] updated server.py --- server.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index 1efaff3..fe40f88 100644 --- a/server.py +++ b/server.py @@ -85,9 +85,12 @@ async def read_index(): app.mount("/", StaticFiles(directory="dist"), name="root") -if __name__ == "__main__": +def start_server(app=app, host="0.0.0.0", port=args.port): import uvicorn + uvicorn.run(app, host=host, port=port) + +if __name__ == "__main__": print(f"Starting server on http://localhost:{args.port}") print(f"vcsky: {'local' if args.vcsky_local else 'proxy'} ({VCSKY_BASE_URL if not args.vcsky_local else 'vcsky/'})") print(f"vcbr: {'local' if args.vcbr_local else 'proxy'} ({VCBR_BASE_URL if not args.vcbr_local else 'vcbr/'})") - uvicorn.run(app, host="0.0.0.0", port=args.port) + start_server() \ No newline at end of file