Skip to content

Repository files navigation

sundai-oct26

Deploying to Vercel

This repo is configured to deploy a Vite static site and a Python FastAPI API on Vercel.

Structure

  • Frontend: web/ built by Vite to web/dist
  • API: FastAPI app in app/server.py, exported via api/index.py

One-time setup

  1. Push this repo to GitHub/GitLab/Bitbucket.
  2. Import the repo in Vercel and accept defaults. Vercel will detect vercel.json.

Environment variables

Set these in Vercel Project Settings → Environment Variables:

  • VERCEL_URL: Provided by Vercel automatically. Used for CORS allowlist.

If your agents require credentials (e.g., Google), add them too.

Build & Routing

  • Build command: npm ci --include=dev && npm run build
  • Output directory: web/dist
  • API routes: /api/* → Python serverless handler api/index.py

Local development

npm install
npm run dev            # Vite at 5173, proxies /api to localhost:8000
uvicorn app.server:app --reload --port 8000

Notes

  • Serverless writes go to /tmp (ephemeral). We write deploy_output.md there.
  • CORS allowlist includes localhost and your https://<project>.vercel.app domain.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages