React and Vite

Host a React or Vite app

A Vite build is a folder of static files, so the container is tiny: build with Node, serve with nginx. When the front end needs an API or a database, they go beside it as more containers of the same app.

Paste this into your coding agent

Run curl -s https://vibecodedhost.com/deploy.md and follow its instructions to deploy this project.

Works in Claude Code, Codex, Cursor and anything else that can run a shell command.

The files

What your agent writes.

You do not have to write any of this. It is here so you can see how little there is, and check your agent's work if a deploy goes wrong.

With this manifest the app would be live at https://my-vite-app.vibecodedhost.app. The name is yours to choose, as long as no other app has it.

Every field of vibe.json, explained →

vibe.json
{
  "version": 1,
  "name": "my-vite-app",
  "containers": [
    {
      "name": "web",
      "build": {
        "context": ".",
        "dockerfile": "Dockerfile"
      },
      "port": 8080,
      "public": true,
      "healthPath": "/"
    }
  ]
}
Dockerfile
FROM node:22-slim AS build
WORKDIR /app
COPY package*.json ./
RUN npm ci
COPY . .
RUN npm run build

FROM nginxinc/nginx-unprivileged:1.27-alpine
COPY nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=build /app/dist /usr/share/nginx/html
EXPOSE 8080
nginx.conf
server {
  listen 8080;
  root /usr/share/nginx/html;
  location / {
    try_files $uri $uri/ /index.html;
  }
}

Worth knowing

React and Vite on Vibe Hosting

Send unknown paths to index.html

A single-page app handles its own routes. Without the try_files line, refreshing on /settings returns a 404.

VITE_ values are set at build time

They are compiled into the bundle, so they belong in the Dockerfile's build stage, not in the container's runtime environment.

Room to grow

When the front end needs a backend, add an API container with its own address, and a database only the API can reach.

Questions

Before you deploy.

Does this work for Vue, Svelte or plain HTML?

Yes. Anything that builds to a folder of static files is served the same way. Plain HTML needs no build stage at all.

Built something else? Next.js, Node.js and Express, FastAPI, Flask, Django, Apps with Postgres, Apps with SQLite, Docker Compose projects.

Your app could be online in a few minutes.

Copy the sentence, paste it into your agent, and read the address it gives you back. No account, no card, nothing to pay.

Paste this into your coding agent

Run curl -s https://vibecodedhost.com/deploy.md and follow its instructions to deploy this project.

Works in Claude Code, Codex, Cursor and anything else that can run a shell command.

Would you rather hold the key yourself?

Questions first, or stuck? Contact support and a person replies as soon as possible.