1.1 KiB
1.1 KiB
OpenCloud
Vue 3 + Vite frontend with a Node/Express API, PostgreSQL, and local file storage.
Development
-
Install dependencies:
npm install -
Create the PostgreSQL schema:
psql "$DATABASE_URL" -f server/schema.sql -
Start the API:
DATABASE_URL="postgres://..." JWT_SECRET="change-me" npm run dev:api -
Start the frontend:
npm run dev
The Vite dev server proxies /api/* and /uploads/* to http://localhost:3001.
Scripts
npm run dev- Vite frontend dev servernpm run dev:api- Express API withtsxnpm run build- Vue typecheck and production frontend buildnpm run typecheck:api- Typecheck the Express APInpm run start:api- Start the API with Node andtsx
Environment
Frontend:
VITE_AMAP_KEY- required for map featuresVITE_SITE_URL- optional canonical URL for generated SEO files
Backend:
DATABASE_URL- PostgreSQL connection stringJWT_SECRET- secret for HTTP-only JWT session cookiesPORT- API port, defaults to3001UPLOAD_ROOT- optional upload directory, defaults toserver/uploads