A FastAPI backend service configured with CORS to work with frontend applications.
- FastAPI framework
- CORS middleware configured for local development and production (zepedrocmota.com)
- Basic health check endpoint
- Ready for Vercel serverless deployment
- Install dependencies using uv:
uv sync
- Run the development server:
uv run uvicorn app.main:app --reload
The API will be available at http://localhost:8000
GET /
- Health check endpoint that returns{"ok": true}
website-backend-python/
├── app/
│ ├── __init__.py
│ └── main.py # FastAPI application
├── pyproject.toml # Project dependencies
├── uv.lock # Lock file for dependencies
└── README.md
- Python 3.12+
- FastAPI
- Uvicorn
This project is configured for deployment to Vercel as a serverless function.
requirements.txt
- Python dependencies for Vercelvercel.json
- Vercel configuration specifying the Python runtime and routes
- Push your code to a GitHub repository
- Connect your repository to Vercel via the Vercel dashboard
- Vercel will automatically detect the configuration and deploy
- Your API will be available at your Vercel domain
- FastAPI automatic docs will be available at
/docs
The app is configured to accept requests from:
http://localhost:3000
(local development)https://www.zepedrocmota.com
(production)https://zepedrocmota.com
(production without www)