wip: almost done with working webapp template

This commit is contained in:
Jayden Pyles
2024-05-18 19:32:54 -05:00
parent c2659662e5
commit 8bbd7169fb
14 changed files with 1206 additions and 29 deletions

23
api/backend/app.py Normal file
View File

@@ -0,0 +1,23 @@
# STL
import logging
# PDM
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
LOG = logging.getLogger(__name__)
app = FastAPI(title="api")
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
@app.route("/api/endpoint")
async def test_route():
return {"hello": "world"}