OpenCloud

Vue 3 + Vite frontend with a Node/Express API, PostgreSQL, and local file storage.

Development

  1. Install dependencies:

    npm install
    
  2. Create the PostgreSQL schema:

    psql "$DATABASE_URL" -f server/schema.sql
    
  3. Start the API:

    DATABASE_URL="postgres://..." JWT_SECRET="change-me" npm run dev:api
    
  4. 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 server
  • npm run dev:api - Express API with tsx
  • npm run build - Vue typecheck and production frontend build
  • npm run typecheck:api - Typecheck the Express API
  • npm run start:api - Start the API with Node and tsx

Environment

Frontend:

  • VITE_AMAP_KEY - required for map features
  • VITE_SITE_URL - optional canonical URL for generated SEO files

Backend:

  • DATABASE_URL - PostgreSQL connection string
  • JWT_SECRET - secret for HTTP-only JWT session cookies
  • PORT - API port, defaults to 3001
  • UPLOAD_ROOT - optional upload directory, defaults to server/uploads
S
Description
No description provided
https://cloud.catpl.top Readme 711 KiB
Languages
Vue 82.2%
TypeScript 15.5%
CSS 2.2%
HTML 0.1%