geovisualisierung/projects/project-3/backend/api.py

22 lines
530 B
Python

import uvicorn
from fastapi import FastAPI, APIRouter
from routers import accidents, bikepoints, dashboard
app = FastAPI(
title="London Bikestations Dashboard API",
docs_url="/api/docs",
redoc_url="/api/redoc"
)
v1_router = APIRouter()
v1_router.include_router(accidents.router)
v1_router.include_router(bikepoints.router)
v1_router.include_router(dashboard.router)
app.include_router(v1_router, prefix="/api/latest")
if __name__ == "__main__":
uvicorn.run("api:app", host="0.0.0.0", port=8080, reload=True)