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
- Create the site with type React / Vue app (built files).
- Build on your computer:bash
npm run build # Vite/Vue: dist/ Create React App: build/ - Upload the build. Pick one:
- File manager: open the site, go to
public_htmland upload the files ofdist/(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.htmlfrom 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.
- File manager: open the site, go to
- 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 topublic_html/distand press Apply. If you uploaded the contents ofdist/straight intopublic_html, leave it as is. - 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:
- Create the site with that type and an Internal app port, such as
3000. - Install Node.js from the App Store.
- 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). - 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.