{
  "manifest_version": "1",
  "slug": "react-vite",
  "title": "React + Vite",
  "headline": "Develop and deploy a React + Vite app on your own VM",
  "description": "Run a React + Vite app on an exe.dev VM: a private dev server with hot reload at your own HTTPS address, an API behind Vite's proxy, and nginx for production.",
  "category": "frameworks",
  "tags": [
    "react",
    "vite",
    "vite dev server",
    "hmr",
    "allowedhosts",
    "typescript",
    "spa",
    "react router",
    "hono",
    "nginx",
    "vercel alternative",
    "netlify alternative"
  ],
  "url": "https://exe.dev/deploy/react-vite",
  "markdown_url": "https://exe.dev/deploy/react-vite.md",
  "upstream": {
    "website": "https://vite.dev",
    "source": "https://github.com/vitejs/vite",
    "docs": "https://vite.dev/guide/",
    "license": "MIT"
  },
  "example_vm_name": "my-react-vite",
  "time": "10 minutes",
  "stack": [
    {
      "name": "Vite 8 dev server",
      "detail": "React 19 + TypeScript, hot reload; vite-dev.service",
      "port": 5173,
      "data": "~/app, a git repository"
    },
    {
      "name": "The API",
      "detail": "Hono 4 on Node.js; api-dev.service from ~/app (3001), api.service from the published release (3000)",
      "port": 3001
    },
    {
      "name": "nginx",
      "detail": "serves the published build, with index.html for every app route, and proxies /api",
      "port": 8000,
      "data": "/var/www/app/releases"
    },
    {
      "name": "Node.js 26 LTS",
      "detail": "NodeSource's apt package; npm, plus pnpm and Yarn through Corepack"
    }
  ],
  "access": [
    {
      "url": "https://my-react-vite.exe.xyz:5173/",
      "who": "private",
      "what": "The Vite dev server, with hot reload"
    },
    {
      "url": "https://my-react-vite.exe.xyz/",
      "who": "private",
      "what": "The published production build, until you make it public"
    }
  ],
  "inputs": [
    {
      "name": "REPO",
      "description": "the GitHub repository of a Vite app to work on, as owner/name or a URL, or `new` to start a fresh React + TypeScript app with a small API"
    }
  ],
  "delivers": [
    "Node.js 26 and the app in ~/app, a git repository; with REPO=new, a React + TypeScript app with a Hono API in server/.",
    "The Vite dev server (vite-dev.service) at https://my-react-vite.exe.xyz:5173/, with hot reload.",
    "For an app with server/index.ts, its API (api-dev.service) on port 3001, behind Vite's /api proxy.",
    "~/bin/publish, which builds a release that nginx serves at https://my-react-vite.exe.xyz/, with the API as api.service; the first release published.",
    "Secrets in ~/app.env (mode 600), read only by the API."
  ],
  "deployable": true,
  "deploy": {
    "new_vm_url": "https://exe.dev/new?prompt=REPO%3D%3Cfill-this-in%3E%0A%0ASet%20up%20React%20%2B%20Vite%20on%20this%20VM%20by%20following%20the%20exe.dev%20recipe%20at%20https%3A%2F%2Fexe.dev%2Fdeploy%2Freact-vite.md%3Fvia%3Ddeploy%20from%20top%20to%20bottom.%0A%0AThe%20values%20at%20the%20top%20of%20this%20message%20are%20mine%3A%0A-%20REPO%3A%20the%20GitHub%20repository%20of%20a%20Vite%20app%20to%20work%20on%2C%20as%20owner%2Fname%20or%20a%20URL%2C%20or%20%60new%60%20to%20start%20a%20fresh%20React%20%2B%20TypeScript%20app%20with%20a%20small%20API%0AAsk%20me%20for%20any%20that%20still%20say%20%3Cfill-this-in%3E%20before%20you%20need%20them.%0A%0AThe%20recipe%27s%20example%20VM%20name%20is%20my-react-vite.%20This%20VM%27s%20name%20is%20the%20output%20of%20%60hostname%60%3A%20use%20it%20wherever%20the%20recipe%20writes%20my-react-vite.%20Skip%20the%20step%20that%20creates%20the%20VM%3B%20you%20are%20on%20it.%0A%0AYou%20are%20done%20when%20all%20of%20these%20are%20true.%20Check%20each%20one%20yourself%3A%0A-%20Node.js%2026%20and%20the%20app%20in%20~%2Fapp%2C%20a%20git%20repository%3B%20with%20REPO%3Dnew%2C%20a%20React%20%2B%20TypeScript%20app%20with%20a%20Hono%20API%20in%20server%2F.%0A-%20The%20Vite%20dev%20server%20%28vite-dev.service%29%20at%20https%3A%2F%2Fmy-react-vite.exe.xyz%3A5173%2F%2C%20with%20hot%20reload.%0A-%20For%20an%20app%20with%20server%2Findex.ts%2C%20its%20API%20%28api-dev.service%29%20on%20port%203001%2C%20behind%20Vite%27s%20%2Fapi%20proxy.%0A-%20~%2Fbin%2Fpublish%2C%20which%20builds%20a%20release%20that%20nginx%20serves%20at%20https%3A%2F%2Fmy-react-vite.exe.xyz%2F%2C%20with%20the%20API%20as%20api.service%3B%20the%20first%20release%20published.%0A-%20Secrets%20in%20~%2Fapp.env%20%28mode%20600%29%2C%20read%20only%20by%20the%20API.%0A%0AFollow%20%22Set%20up%20by%20hand%22%20from%20%22Install%20Node.js%22%20on%3B%20the%20sections%20above%20it%0Aare%20for%20the%20owner%20afterwards.%0A%0AFinish%20with%20the%20URLs%20I%20should%20open.%0A",
    "terminal": "curl -fsSL https://exe.dev/deploy/react-vite/prompt.txt | ssh exe.dev new --prompt=/dev/stdin",
    "prompt": "REPO=\u003cfill-this-in\u003e\n\nSet up React + Vite on this VM by following the exe.dev recipe at https://exe.dev/deploy/react-vite.md?via=deploy from top to bottom.\n\nThe values at the top of this message are mine:\n- REPO: the GitHub repository of a Vite app to work on, as owner/name or a URL, or `new` to start a fresh React + TypeScript app with a small API\nAsk me for any that still say \u003cfill-this-in\u003e before you need them.\n\nThe recipe's example VM name is my-react-vite. This VM's name is the output of `hostname`: use it wherever the recipe writes my-react-vite. Skip the step that creates the VM; you are on it.\n\nYou are done when all of these are true. Check each one yourself:\n- Node.js 26 and the app in ~/app, a git repository; with REPO=new, a React + TypeScript app with a Hono API in server/.\n- The Vite dev server (vite-dev.service) at https://my-react-vite.exe.xyz:5173/, with hot reload.\n- For an app with server/index.ts, its API (api-dev.service) on port 3001, behind Vite's /api proxy.\n- ~/bin/publish, which builds a release that nginx serves at https://my-react-vite.exe.xyz/, with the API as api.service; the first release published.\n- Secrets in ~/app.env (mode 600), read only by the API.\n\nFollow \"Set up by hand\" from \"Install Node.js\" on; the sections above it\nare for the owner afterwards.\n\nFinish with the URLs I should open.\n",
    "prompt_url": "https://exe.dev/deploy/react-vite/prompt.txt"
  },
  "published": "2026-11-21",
  "updated": "2026-11-21",
  "verified": "2026-11-21",
  "related": [
    "nodejs",
    "nextjs",
    "astro",
    "bun",
    "code-server",
    "dev-test-prod"
  ],
  "alternatives": [
    "Vercel",
    "Netlify"
  ],
  "files": [
    "https://exe.dev/deploy/react-vite/App.tsx",
    "https://exe.dev/deploy/react-vite/publish"
  ]
}
