put root route last

master
gtitov 3 years ago
parent 3efd435b03
commit 314e9591af

@ -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

@ -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)
```
INFO: Uvicorn running on http://127.0.0.1:80 (Press CTRL+C to quit)
```
Для работы в локальной сети узнать адрес компьютера в локальной сети
Loading…
Cancel
Save