File size: 861 Bytes
f7c5ee1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
"""

Basic API for Vercel deployment without database dependencies

"""

from fastapi import FastAPI

app = FastAPI(title="Todo API - Basic", version="1.0.0")

@app.get("/")
def root():
    """Root endpoint for health check."""
    return {
        "message": "Todo API is running on Vercel",
        "status": "healthy",
        "deployment": "serverless",
        "note": "Full functionality requires database setup"
    }

@app.get("/health")
def health():
    """Health check endpoint."""
    return {"status": "healthy", "timestamp": "2026-01-14"}

@app.get("/status")
def status():
    """Status endpoint."""
    return {
        "api": "Todo API",
        "version": "2.0.0",
        "status": "deployed",
        "platform": "Vercel serverless",
        "database_status": "not connected (requires external database)"
    }