This repo contains a Vite React frontend (in frontend/) and a Node (Express + SQLite) backend adapted to run as serverless functions on Vercel (API entrypoint in api/index.js).
Quick deploy steps:
-
Install dependencies at repo root (for API libs used by the serverless function):
npm install
-
From project root, run locally for quick smoke:
node api/index.js
Then open http://localhost:3000/api/users and http://localhost:3000/api-docs
-
Deploy to Vercel:
-
Connect this repository in the Vercel dashboard. Vercel will run the frontend build (
frontend) and build the API function (api/index.js). -
Or, use the CLI:
npx vercel --prod
-
Notes:
- SQLite on serverless is ephemeral. For persistent data, migrate to a managed DB (Postgres, etc.).
- Environment variables: use Vercel dashboard to set any needed env vars (e.g.,
DB_FILEif you want a custom path).