Skip to content
All recipes
Frontend

Deploy React + Vite SPA

A client-rendered React application built into static files and served with fallback routing.

Why use it

Put a dashboard, prototype or customer-facing frontend online without keeping a Node.js build server running.

Build plan

  1. Run the repository’s production build and confirm the static output directory is dist.
  2. Add a multi-stage Dockerfile that installs a production static server and copies only dist into the runtime image.
  3. Serve on 0.0.0.0:3000 with SPA fallback routing, then open a nested client-side route directly.

Resources and values

Resources
1 ServiceNo database
Required values
No runtime secretsPublic VITE_* build values only
Check before you deploy

Every 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