20 lines
472 B
Python
20 lines
472 B
Python
|
|
import logging
|
||
|
|
|
||
|
|
from fastapi import FastAPI
|
||
|
|
|
||
|
|
try:
|
||
|
|
from pythonjsonlogger import jsonlogger
|
||
|
|
handler = logging.StreamHandler()
|
||
|
|
handler.setFormatter(jsonlogger.JsonFormatter("%(asctime)s %(levelname)s %(name)s %(message)s"))
|
||
|
|
logging.root.addHandler(handler)
|
||
|
|
except ImportError:
|
||
|
|
logging.basicConfig(level=logging.INFO)
|
||
|
|
logging.root.setLevel(logging.INFO)
|
||
|
|
|
||
|
|
app = FastAPI(title="EvoSync")
|
||
|
|
|
||
|
|
|
||
|
|
@app.get("/health")
|
||
|
|
async def health():
|
||
|
|
return {"status": "ok"}
|