init project

This commit is contained in:
2025-05-19 15:50:55 +02:00
parent c0216eb2dd
commit b8bd3b0398
26 changed files with 15335 additions and 0 deletions

16
backend/main.py Normal file
View File

@@ -0,0 +1,16 @@
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
app = FastAPI()
app.add_middleware(
CORSMiddleware,
allow_origins=["*"], # oppure ["http://localhost:4200"] se vuoi essere più restrittivo
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
@app.get("/api/hello")
def hello():
return {"message": "Hello from Python API"}