Add backend directory

This commit is contained in:
Hang Cui
2025-10-17 14:05:14 -07:00
parent e9bb3b0a7f
commit a87080f9c4
3 changed files with 19 additions and 0 deletions

8
backend/main.py Normal file
View File

@@ -0,0 +1,8 @@
from fastapi import FastAPI
app = FastAPI()
@app.get("/")
def read_root():
return {"message": "Hello, World!"}

View File

View File

@@ -0,0 +1,11 @@
from fastapi.testclient import TestClient
from main import app
client = TestClient(app)
def test_read_root():
response = client.get("/")
assert response.status_code == 200
assert response.json() == {"message": "Hello, World!"}