refactor(weather): add app_build method
This commit is contained in:
12
weather/main.py
Normal file
12
weather/main.py
Normal 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)
|
||||
Reference in New Issue
Block a user