All guides
React · Vue · Svelte (SPA)
Static builds (Vite etc.) are served by nginx automatically, with SPA fallback.
1Detection
If package.json uses a static build tool (vite, react-scripts…) and no server start script, it's treated as an SPA: the build output (dist or build) is served by nginx on $PORT with index.html fallback.
json"scripts": { "dev": "vite", "build": "vite build" }2Deploy (pick one)
① Connect GitHub: Project → Add service → GitHub repository (deploys on push) ② From this folder: oc up --wait (builds even without a Dockerfile) ③ Upload a folder or zip in the console: Add service → Upload source
bashoc login oc project create my-app --link oc up --wait3API URL
VITE_* variables are embedded at build time. Use your backend service's public URL.
bashoc variables set VITE_API_URL=https://api-my-app.app.onecloud.im