Files
hello-cicd/main.py
sz11zs 9969093c91
Some checks failed
CI/CD Pipeline popravak / build (push) Successful in 1m19s
CI/CD Pipeline popravak / deploy (push) Failing after 1m5s
init: hello-cicd projectsetup
2026-05-03 09:50:32 +02:00

18 lines
351 B
Python

from fastapi import FastAPI
import os, datetime
app = FastAPI()
@app.get("/health")
def health():
return {
"status": "ok",
"version": os.getenv("APP_VERSION", "dev"),
"timestamp": datetime.datetime.utcnow().isoformat()
}
@app.get("/")
def root():
return {"poruka": "Zdravo s k3s!", "host": os.uname().nodename}