Spaces:
Runtime error
Runtime error
Download src/main.py from low-key-007/communityapp2: direct link, hf CLI and curl.
- Browser
- Download file 690 Bytes
-
https://huggingface.co/spaces/low-key-007/communityapp2/resolve/main/src/main.py
- Command line
-
hf download hf://spaces/low-key-007/communityapp2/src/main.py
-
curl -L -o main.py https://huggingface.co/spaces/low-key-007/communityapp2/resolve/main/src/main.py
690 Bytes
| from fastapi import FastAPI | |
| from fastapi.middleware.cors import CORSMiddleware | |
| from src.routers import auth, admin, issues, community | |
| app = FastAPI( | |
| title="CommunityConnect API", | |
| version="3.0", | |
| description="Backend for Smart Residential Community Management" | |
| ) | |
| app.add_middleware( | |
| CORSMiddleware, | |
| allow_origins=["*"], | |
| allow_credentials=True, | |
| allow_methods=["*"], | |
| allow_headers=["*"], | |
| ) | |
| # Include Modular Routers | |
| app.include_router(auth.router) | |
| app.include_router(admin.router) | |
| app.include_router(issues.router) | |
| app.include_router(community.router) | |
| def health_check(): | |
| return {"status": "operational", "system": "CommunityConnect v3.0"} |