Skip to content

Commit 0909617

Browse files
author
Neil Munoz
committed
fix: code formatting - Black compliance
- Fixed api/index.py formatting to comply with Black rules - Changed single quotes to double quotes - Added proper line spacing and formatting - This resolves the GitHub Actions formatting check failure
1 parent 4ba5bde commit 0909617

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

api/index.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
sys.path.insert(0, str(project_root))
88

99
# Set environment variables for production
10-
os.environ.setdefault('ENVIRONMENT', 'production')
11-
os.environ.setdefault('SECRET_KEY', os.environ.get('SECRET_KEY', 'vercel-production-key-change-in-env'))
10+
os.environ.setdefault("ENVIRONMENT", "production")
11+
os.environ.setdefault(
12+
"SECRET_KEY", os.environ.get("SECRET_KEY", "vercel-production-key-change-in-env")
13+
)
1214

1315
# Import the FastAPI app
1416
from app.main import app
@@ -17,19 +19,23 @@
1719
# If your FastAPI app is named differently, change this
1820
app = app
1921

22+
2023
# Optional: Add Vercel-specific middleware or configuration
2124
@app.middleware("http")
2225
async def add_vercel_headers(request, call_next):
2326
response = await call_next(request)
2427
response.headers["X-Vercel-Cache"] = "MISS"
2528
return response
2629

30+
2731
# Health check endpoint for Vercel
2832
@app.get("/api/health")
2933
async def health_check():
3034
return {"status": "healthy", "platform": "vercel", "app": "NeuroBank FastAPI"}
3135

36+
3237
# For local development
3338
if __name__ == "__main__":
3439
import uvicorn
40+
3541
uvicorn.run(app, host="0.0.0.0", port=int(os.environ.get("PORT", 8000)))

0 commit comments

Comments
 (0)