File size: 544 Bytes
f02c4c4
b883b66
 
f02c4c4
71a020f
f02c4c4
b883b66
 
 
 
 
 
 
 
 
f02c4c4
71a020f
 
 
 
b883b66
71a020f
f02c4c4
b883b66
f02c4c4
71a020f
f02c4c4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import os
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware

app = FastAPI(title="Deployment Observability API")

app.add_middleware(
    CORSMiddleware,
    allow_origins=["*"],
    allow_credentials=True,
    allow_methods=["*"],
    allow_headers=["*"],
)


@app.get("/")
async def root():
    return {
        "status": "healthy",
        "service": "deployment-ready-ga2-e8c0f1",
        "port": int(os.environ.get("APP_PORT", 7152)),
    }


@app.get("/health")
async def health():
    return {"status": "ok"}