Add api server code and workflow
This commit is contained in:
16
src/main.py
Normal file
16
src/main.py
Normal 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)
|
||||
Reference in New Issue
Block a user