Spaces:
Running
Running
| ```python | |
| from fastapi import FastAPI | |
| from fastapi.staticfiles import StaticFiles | |
| from backend.main import app as api_app | |
| from backend.config import get_settings | |
| import os | |
| settings = get_settings() | |
| app = FastAPI(title="CryptoSignal Sleuth Pro") | |
| # Mount the API under /api | |
| app.mount(settings.API_BASE_URL, api_app) | |
| # Serve static files from frontend/dist | |
| app.mount( | |
| settings.FRONTEND_BASE_PATH, | |
| StaticFiles(directory="frontend/dist", html=True), | |
| name="static" | |
| ) | |
| if __name__ == "__main__": | |
| import uvicorn | |
| uvicorn.run(app, host="0.0.0.0", port=7860) | |
| ``` |