Frontend and backend work together fine, complete workflow is implemented

This commit is contained in:
2026-08-01 17:04:03 +05:00
parent e87d8089bf
commit cd3ce0337b
13 changed files with 4499 additions and 86 deletions
+7 -1
View File
@@ -1,11 +1,13 @@
"""FastAPI application entry point."""
import asyncio
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from backend.config import settings
from backend.api import upload, split, status, download
from backend.api.websocket import router as websocket_router
from backend.services import progress_publisher # Import the module
app = FastAPI(
title="Audio Splitter Web API",
@@ -22,6 +24,10 @@ app.add_middleware(
allow_headers=["*"],
)
# Store the main event loop in the progress_publisher module
# This avoids a circular import
progress_publisher.MAIN_LOOP = asyncio.get_running_loop()
# Include routers
app.include_router(upload.router)
app.include_router(split.router)
@@ -37,4 +43,4 @@ async def root():
@app.get("/health")
async def health():
return {"status": "healthy"}
return {"status": "healthy"}