add docker files

This commit is contained in:
Marcus Almert
2025-10-28 12:18:48 +01:00
parent d793462ace
commit dbf54f59ef
6 changed files with 74 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
import os
app = FastAPI()
@@ -13,4 +14,10 @@ app.add_middleware(
@app.get("/api/hello")
def read_root():
return {"message": "Hallo von FastAPI 🎉"}
return {"message": "Hallo von FastAPI 🎉"}
@app.get("/api/versions")
def read_root():
message = os.popen("python --version").read().strip()
return {"message": message}