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"}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue