Automated Action e7225e6443 Add Task Management System with FastAPI and SQLite
Features:
- User authentication with JWT tokens
- Task and project CRUD operations
- Task filtering and organization

generated with BackendIM... (backend.im)
2025-05-12 10:14:26 +00:00

33 lines
805 B
Python

from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from pathlib import Path
from app.routers import auth, users, tasks, projects
app = FastAPI(
title="Task Management System",
description="A REST API for managing tasks and projects",
version="0.1.0",
)
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
)
# Include routers
app.include_router(auth.router)
app.include_router(users.router)
app.include_router(projects.router)
app.include_router(tasks.router)
@app.get("/health", tags=["Health"])
async def health_check():
return {"status": "healthy"}
if __name__ == "__main__":
import uvicorn
uvicorn.run("main:app", host="0.0.0.0", port=8000, reload=True)