starting
This commit is contained in:
commit
a764c92a0b
11 changed files with 1081 additions and 0 deletions
17
backend/main.py
Normal file
17
backend/main.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from fastapi import FastAPI
|
||||
from fastapi.middleware.cors import CORSMiddleware
|
||||
|
||||
app = FastAPI()
|
||||
|
||||
app.add_middleware(
|
||||
CORSMiddleware,
|
||||
allow_origins=["http://localhost:3000"],
|
||||
allow_methods=["*"],
|
||||
allow_headers=["*"],
|
||||
)
|
||||
|
||||
|
||||
@app.get("/api/hello")
|
||||
def hello():
|
||||
return {"message": "Hello from FastAPI"}
|
||||
|
||||
9
backend/pyproject.toml
Normal file
9
backend/pyproject.toml
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[project]
|
||||
name = "backend"
|
||||
version = "0.1.0"
|
||||
requires-python = ">=3.11"
|
||||
dependencies = [
|
||||
"fastapi>=0.115.6",
|
||||
"uvicorn>=0.34.0",
|
||||
]
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue