Deploy a React or Vite app
This guide replaces the old “How to deploy React JS app on DockHive” page.
With Drone (recommended)
Section titled “With Drone (recommended)”Push your code to GitHub, start a new app, pick the repository and click Deploy with Drone. Or run hivepod deploy in the project folder.
With a preset
Section titled “With a preset”Pick React (Vite or Create React App), Vue, Svelte, Angular or Vite. DockHive runs your build script and serves the built files.
{ "scripts": { "dev": "vite", "build": "vite build" }}- Client-side routing: single-page apps get their
index.htmlfor unknown paths, so React Router and similar work on refresh. - Don’t deploy the dev server.
viteandvite previewaren’t meant for production and refuse unknown hostnames. - Build-time variables:
VITE_*values are baked into the bundle and visible to anyone. Never put secrets in them. See Environment variables. - Backends: deploy your API as a separate app and call it by its address.