feat: add cache and logging

This commit is contained in:
2024-07-31 00:18:32 +03:00
parent 7f0e19fb5a
commit 891869c58c
7 changed files with 85 additions and 7 deletions

View File

@@ -1,4 +1,5 @@
from os import environ
from pathlib import Path
import uvicorn
@@ -9,4 +10,10 @@ app = build_app(GismeteoApi())
def run():
uvicorn.run("weather.main:app", host="0.0.0.0", port=8000, reload="DEBUG" in environ)
uvicorn.run(
"weather.main:app",
host="0.0.0.0",
port=8000,
log_config=str(Path(__file__).parent / "logging.yaml"),
reload="DEBUG" in environ,
)