From 314e9591af9c1c41baa0735d06a172b94bbe0871 Mon Sep 17 00:00:00 2001 From: gtitov Date: Thu, 3 Nov 2022 17:00:52 +0300 Subject: [PATCH] put root route last --- main.py | 4 ++-- readme.md | 8 +++++--- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/main.py b/main.py index 011f29f..5e9188c 100644 --- a/main.py +++ b/main.py @@ -123,8 +123,8 @@ def end_test(password: str): else: return("Неверный пароль") -app.mount("/", StaticFiles(directory="gui", html = True), name="gui") # must be after method since it uses them -app.mount("/pictures", StaticFiles(directory="pictures"), name="pictures") # must be after method since it uses them +app.mount("/pictures", StaticFiles(directory="pictures"), name="pictures") +app.mount("/", StaticFiles(directory="gui", html = True), name="gui") # must be after all since root route will fill all empty routes \ No newline at end of file diff --git a/readme.md b/readme.md index bd4e31f..4e00325 100644 --- a/readme.md +++ b/readme.md @@ -2,11 +2,13 @@ ```PowerShell pip install -r requirements.txt -uvicorn main:app +python -m uvicorn main:app --host=0.0.0.0 --port=80 ``` Интерфейс будет доступен по адресу работы uvicorn ```PowerShell -INFO: Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit) -``` \ No newline at end of file +INFO: Uvicorn running on http://127.0.0.1:80 (Press CTRL+C to quit) +``` + +Для работы в локальной сети узнать адрес компьютера в локальной сети \ No newline at end of file