Skip to content

React / Vue apps ​

The React / Vue app (built files) site type serves a built single-page app. Files that exist are served as they are, and every other path opens index.html, so client-side routes such as /dashboard/settings work on refresh.

Deploy a React, Vue, Vite or Angular build ​

  1. Create the site with type React / Vue app (built files).
  2. Build on your computer:
    bash
    npm run build          # Vite/Vue: dist/   Create React App: build/
  3. Upload the build. Pick one:
    • File manager: open the site, go to public_html and upload the files of dist/ (up to 50 MB per file). For many files, the terminal or git is quicker.
    • Command line: merp site upload example.com dist/index.html public_html/index.html from your computer with an API key.
    • Deploy from git: if the built files are in a repository or branch, use the Deploy tab.
    • Terminal: open the site's terminal, clone your repository and build on the server with Node.js from the App Store.
  4. Point the site folder at the build. If your files sit in public_html/dist, set Site folder (what visitors see) on the site page to public_html/dist and press Apply. If you uploaded the contents of dist/ straight into public_html, leave it as is.
  5. Get SSL and open the site.

API on another site

If your app calls an API, host the API as its own site (type App on a port for Node or Python, or PHP) on a subdomain such as api.example.com, and point the app's API URL there.

Server-side apps (Next.js, Nuxt, Express) ​

An app that runs its own server is not a static build. Use the App on a port (Node, Python…) type:

  1. Create the site with that type and an Internal app port, such as 3000.
  2. Install Node.js from the App Store.
  3. In the site's terminal, install and start your app on that port (for example with npm ci && npm run build && npm start, or a process manager).
  4. The web server forwards visitors on 80 and 443 to your port, WebSockets included.

If nothing answers on the port, the site page shows a warning and visitors get a 502 error.

SetServer Panel documentation