Add api server code and workflow

This commit is contained in:
Xin Wang
2025-04-29 15:03:02 +08:00
commit a1a4bceb9a
13 changed files with 16662 additions and 0 deletions

16
src/main.py Normal file
View File

@@ -0,0 +1,16 @@
from fastapi import FastAPI
import sys
sys.path.append('..')
from api.endpoints import router as api_router
app = FastAPI(
title="AI Accident Information Collection API",
description="AI Accident Information Collection API",
version="1.0.0"
)
@app.get("/")
def read_root():
return {"message": "Server is running."}
app.include_router(api_router)