feat: initial project setup
This commit is contained in:
29
backend/app/main.py
Normal file
29
backend/app/main.py
Normal file
@@ -0,0 +1,29 @@
|
||||
"""House ELO Ranking API."""
|
||||
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
from app.routers import comparisons, listings, rankings
|
||||
|
||||
app = FastAPI(
|
||||
title="House ELO Ranking",
|
||||
description="Pairwise comparison and ELO ranking of Funda listings",
|
||||
version="1.0.0",
|
||||
)
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["*"],
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
app.include_router(comparisons.router, prefix="/api", tags=["comparisons"])
|
||||
app.include_router(listings.router, prefix="/api", tags=["listings"])
|
||||
app.include_router(rankings.router, prefix="/api", tags=["rankings"])
|
||||
|
||||
|
||||
@app.get("/api/health")
|
||||
def health():
|
||||
return {"status": "ok"}
|
||||
Reference in New Issue
Block a user