feat: add API to get daily consumption
This commit is contained in:
parent
9c883a8eca
commit
a0acb2950c
18 changed files with 278 additions and 6 deletions
18
server/app/adapters/http/main.py
Normal file
18
server/app/adapters/http/main.py
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
from .readings import readings_router
|
||||
|
||||
app = FastAPI(title="SimuGazAPI", version="1.0.0")
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["*"],
|
||||
allow_methods=["GET"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
app.include_router(readings_router)
|
||||
|
||||
@app.get("/health")
|
||||
def health():
|
||||
return {"status": "ok"}
|
||||
Loading…
Add table
Add a link
Reference in a new issue