React

Reactアプリをデプロイ

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

    デプロイする

    プロジェクトのルートで「npx harvis deploy dist」を実行してください。この最初のデプロイに設定もログインも不要 — すぐに公開URLが手に入り、いつでも無料アカウントにサイトを紐付けられる非公開のオーナー登録リンクも一緒に発行されます。

Reactをコマンド1つでデプロイ

プロジェクトをビルドして、出力フォルダをharvisに渡すだけ。最初のデプロイにアカウントは不要 — 公開リンクと、あとで管理するための非公開のオーナー登録リンクが手に入ります。

terminal
npm run build
npx harvis deploy dist

ターミナルよりファイルをドラッグする方が好みですか?プロジェクトをビルドしたら、出力フォルダをここにドロップすれば同じように公開できます。

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.

Reactアプリをharvisにデプロイするのは本当に無料ですか?

はい、クレジットカードは不要です。無料枠は1サイトあたり500ファイル・50 MBで、静的なReactのビルドなら十分すぎるほどです。公開したサイトに有効期限はなく、削除するまで公開され続けます。

デプロイしたReactサイトに独自ドメインは使えますか?

どのサイトも無料のharvis.devアドレスが割り当てられ、オーナー登録後にダッシュボードから好きなサブドメインを選べます(ランダムな名前の代わりにmy-app.harvis.devのように)。すでに持っている独自ドメイン(mystore.comなど)をサイトに向ける機能は、まだ用意されていません。

ReactをVercelやNetlifyにデプロイするのと何が違いますか?

VercelやNetlifyは、Gitリポジトリを接続してビルドを自分たちのサーバー上で実行し、ダッシュボードで設定する仕組みが中心です。harvisはそれをすべて省略します。ローカル(または自分のCI)でビルドし、出力フォルダに対してCLIコマンドを1つ実行するだけでリンクが手に入ります — プロジェクトの設定も、サイトを残しておきたくなるまでのアカウントも不要です。

other frameworks

別のものをデプロイしますか?

手順はどれでも同じです — ビルドしてから、出力フォルダをnpx harvis deployするだけ。