Files
hello-cicd/main.py
filip susak 13a5b94ac1
Some checks failed
CI/CD Pipeline / build (push) Has been cancelled
CI/CD Pipeline / deploy (push) Has been cancelled
init: hello-cicd project setup
2026-04-14 10:37:48 +02:00

18 lines
360 B
Python

# main.py
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}