initial commit
This commit is contained in:
16
backend/src/main.py
Normal file
16
backend/src/main.py
Normal file
@@ -0,0 +1,16 @@
|
||||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["*"],
|
||||
allow_credentials=True,
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
@app.get("/api/hello")
|
||||
def read_root():
|
||||
return {"message": "Hallo von FastAPI 🎉"}
|
||||
Reference in New Issue
Block a user