Deploy aplikasi React kamu
A React app is just static files once it's built — the CLI doesn't know or care that it's React. The only thing that varies is which folder the build lands in, and that depends on what scaffolded the project.
- 01
Build the app
Run "npm run build" (or the equivalent for your package manager). This bundles and minifies everything into a folder of static files.
- 02
Find the output folder
Scaffolded with Vite (the current default)? It's "dist". Still on Create React App? It's "build" — CRA is deprecated but plenty of projects still use it.
- 03
Deploy
Jalankan "npx harvis deploy dist" dari root proyek kamu. Tanpa konfigurasi dan tanpa login untuk deploy pertama ini — kamu langsung mendapat URL live, plus link klaim pribadi untuk menghubungkan situs itu ke akun gratis kapan pun kamu siap.
Deploy React dengan satu perintah
Build proyek kamu, lalu serahkan folder output ke harvis. Tidak perlu akun untuk deploy pertama — kamu akan mendapat link live dan link klaim pribadi untuk mengelolanya nanti.
npm run build npx harvis deploy dist
Lebih suka menyeret file daripada terminal? Build proyek kamu, lalu lepas folder output di sini dan publikasikan dengan cara yang sama.
Pertanyaan deploy React
My project uses Create React App, not Vite. Does anything change?
Only the folder name. Run "npm run build" as usual, then "npx harvis deploy build" instead of "dist". Everything else — routing, assets, the deploy itself — works the same.
Does client-side routing (React Router) work after deploying?
Yes, for the common case. harvis falls back to your entrypoint HTML file for unmatched paths, which is what client-side routers need to handle a direct visit to a deep link like /settings.
Apakah men-deploy aplikasi React ke harvis benar-benar gratis?
Ya, tanpa kartu kredit. Batas gratisnya adalah 500 file dan 50 MB per situs, yang lebih dari cukup untuk build statis React dengan banyak ruang tersisa. Situs yang dipublikasikan tidak kedaluwarsa — situs itu tetap live sampai kamu menghapusnya.
Bisakah saya memakai domain sendiri untuk situs React yang di-deploy?
Setiap situs mendapat alamat harvis.dev gratis, dan kamu bisa memilih subdomain sendiri dari dashboard setelah mengklaimnya — my-app.harvis.dev, bukan yang acak. Mengarahkan domain yang sudah kamu miliki (seperti mytoko.com) ke situs itu belum didukung.
Apa bedanya ini dengan men-deploy React ke Vercel atau Netlify?
Vercel dan Netlify dibangun di sekitar menghubungkan repo Git dan menjalankan build kamu di server mereka, dengan dashboard untuk mengonfigurasinya. harvis melewati semua itu: kamu build secara lokal (atau di CI kamu sendiri), jalankan satu perintah CLI terhadap folder output, dan dapatkan link — tanpa setup proyek, dan tanpa perlu akun sampai kamu ingin mempertahankan situs itu.
Men-deploy sesuatu yang lain?
Caranya sama di mana pun — build, lalu npx harvis deploy hasil outputnya.