Files
hello-cicd/main.py
sz11zs b790da9c79
Some checks failed
CI/CD Pipeline / build (push) Failing after 43s
CI/CD Pipeline / deploy (push) Has been skipped
trigger: pokretanje vjezbe korak 5
2026-05-02 16:11:54 +02:00

17 lines
354 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}