first init

This commit is contained in:
WillowMT
2026-02-20 14:00:43 +07:00
commit f17c0ba90e
21 changed files with 960 additions and 0 deletions

26
backend/main.py Normal file
View File

@@ -0,0 +1,26 @@
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
app = FastAPI(
title="API",
description="FastAPI backend",
version="0.1.0",
)
app.add_middleware(
CORSMiddleware,
allow_origins=["http://localhost:5173"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
@app.get("/")
def root():
return {"message": "Hello from FastAPI"}
@app.get("/health")
def health():
return {"status": "ok"}

2
backend/requirements.txt Normal file
View File

@@ -0,0 +1,2 @@
fastapi==0.115.6
uvicorn[standard]==0.32.1