React

React uygulamanı deploy et

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.

steps
  1. 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.

  2. 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.

  3. 03

    Deploy et

    Proje kök dizininden "npx harvis deploy dist" çalıştır. Bu ilk deploy için yapılandırma ve giriş gerekmez — hemen canlı bir URL alırsın, ayrıca hazır olduğunda siteyi ücretsiz bir hesaba bağlamak için özel bir claim bağlantısı.

React'i tek komutla deploy et

Projeni derle, ardından çıktı klasörünü harvis'e ver. İlk deploy için hesap gerekmez — canlı bir bağlantı ve daha sonra yönetmek için özel bir claim bağlantısı alırsın.

terminal
npm run build
npx harvis deploy dist

Terminal yerine dosyaları sürüklemeyi mi tercih edersin? Projeni derle, ardından çıktı klasörünü buraya bırak ve aynı şekilde yayınla.

git hook

Deploy React on every git push

The command above is one you will run again after every change. A git hook runs it for you: this one already points at dist, the folder React builds into.

The folder holding the finished site. "." is the repo root, which is right for hand-written HTML; a static-site generator writes somewhere else.

pre-push fires on every branch and every remote, so a feature branch would publish over your live site. With this on, a push from anywhere else exits early and goes through untouched.

in your repo root
cat > .git/hooks/pre-push <<'EOF'
#!/bin/sh
set -e
npm run build
harvis deploy dist
EOF
chmod +x .git/hooks/pre-push

The options, the gotchas and how to share a hook with your team are on the git hook page.

React deploy soruları

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.

Bir React uygulamasını harvis'e deploy etmek gerçekten ücretsiz mi?

Evet, kart gerekmez. Ücretsiz limitler site başına 500 dosya ve 50 MB'dır, bu da statik bir React build'i için bol bol yer bırakır. Yayınlanan siteler süresi dolmaz — sen silene kadar yayında kalırlar.

Deploy edilen React sitesinde kendi alan adımı kullanabilir miyim?

Her site ücretsiz bir harvis.page adresi alır ve claim ettikten sonra panondan kendi alt alan adını seçebilirsin — rastgele biri yerine my-app.harvis.page gibi. Zaten sahip olduğun bir alan adını (mystore.com gibi) siteye yönlendirmek henüz desteklenmiyor.

Bunun React'i Vercel veya Netlify'a deploy etmekten farkı ne?

Vercel ve Netlify, bir Git reposunu bağlamak ve build'ini onların sunucularında çalıştırmak üzerine kuruludur, yapılandırmak için de bir panoya sahiptirler. harvis bunların hepsini atlar: yerelde (ya da kendi CI'nda) derlersin, çıktı klasörüne karşı tek bir CLI komutu çalıştırırsın ve bir bağlantı alırsın — proje kurulumu yok, siteyi saklamak isteyene kadar hesap da yok.

other frameworks

Başka bir şey mi deploy ediyorsun?

Tarif her yerde aynı — derle, ardından npx harvis deploy ile çıktıyı yayınla.