Deploy React + Vite SPA
A client-rendered React application built into static files and served with fallback routing.
Put a dashboard, prototype or customer-facing frontend online without keeping a Node.js build server running.
Build plan
- Run the repository’s production build and confirm the static output directory is dist.
- Add a multi-stage Dockerfile that installs a production static server and copies only dist into the runtime image.
- Serve on 0.0.0.0:3000 with SPA fallback routing, then open a nested client-side route directly.
Resources and values
1 ServiceNo databaseNo runtime secretsPublic VITE_* build values onlyEvery VITE_* value is compiled into browser code. Keep secrets in a backend service, and stop if the current build expects a private value.
Ask your coding agent
Prepare this React and Vite repository for aidrop without redesigning it. Run the production build into dist and add a multi-stage Dockerfile that serves only dist on 0.0.0.0:3000 with single-page-app fallback routing. Do not use vite preview as the production server. Treat every VITE_* value as public and stop if the frontend expects a secret. Deploy with / as the health path, open the homepage and one nested route directly, then return the public address.
Put React + Vite SPA online
Connect your coding agent, paste the quickstart and keep the build, runtime and public address in one aidrop Project.
7 days free · No credit card required