20 lines
374 B
Python
20 lines
374 B
Python
from os import environ
|
|
from pathlib import Path
|
|
|
|
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,
|
|
log_config=str(Path(__file__).parent / "logging.yaml"),
|
|
reload="DEBUG" in environ,
|
|
)
|