refactor(weather): add app_build method

This commit is contained in:
2024-07-28 20:26:38 +03:00
parent 48a6cce569
commit 1fb627110d
12 changed files with 254 additions and 199 deletions

12
weather/main.py Normal file
View File

@@ -0,0 +1,12 @@
from os import environ
import uvicorn
from gismeteo.api import GismeteoApi
from weather.app import build_app
app = build_app(GismeteoApi())
def run():
uvicorn.run("weather.main:app", host="0.0.0.0", port=8000, reload="DEBUG" in environ)