Automated Action 73c662b24c Fix requirements.txt issue and lint code
- Add requirements.txt file to git
- Add project files to git
- Fix linting issues in task.py and env.py
- Update SQLAlchemy queries to use 'not' instead of '== False'
- Fix import ordering in env.py
2025-06-06 10:44:18 +00:00

39 lines
799 B
Python

import uvicorn
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from app.core.config import settings
from app.api.v1.api import api_router
app = FastAPI(
title=settings.PROJECT_NAME,
openapi_url="/openapi.json",
docs_url="/docs",
redoc_url="/redoc",
)
# Set up CORS middleware
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
app.include_router(api_router)
@app.get("/health", tags=["Health"])
def health_check():
"""
Health check endpoint to verify the service is running.
"""
return {"status": "ok"}
if __name__ == "__main__":
uvicorn.run(
"main:app",
host="0.0.0.0",
port=8000,
reload=True,
)