Angularアプリをデプロイ
ng build produces static files either way, but exactly where it puts them changed with Angular 17's new esbuild-based application builder — worth checking before you point the CLI at the wrong folder.
- 01
Build the app
Run "ng build" (or "npm run build"). Angular compiles and minifies the project into static output — no dev server, no watch mode.
- 02
Check which output layout you have
Angular 17 and newer (application builder): output lands in "dist/<project-name>/browser". Angular 16 and older: it's directly in "dist/<project-name>". Look for the folder that has an index.html at its top.
- 03
デプロイする
プロジェクトのルートで「npx harvis deploy dist/<project-name>/browser」を実行してください。この最初のデプロイに設定もログインも不要 — すぐに公開URLが手に入り、いつでも無料アカウントにサイトを紐付けられる非公開のオーナー登録リンクも一緒に発行されます。
Angularをコマンド1つでデプロイ
プロジェクトをビルドして、出力フォルダをharvisに渡すだけ。最初のデプロイにアカウントは不要 — 公開リンクと、あとで管理するための非公開のオーナー登録リンクが手に入ります。
ng build npx harvis deploy dist/<project-name>/browser
ターミナルよりファイルをドラッグする方が好みですか?プロジェクトをビルドしたら、出力フォルダをここにドロップすれば同じように公開できます。
Angularのデプロイに関する質問
The dist folder doesn't have an index.html at the top — what am I missing?
You're on Angular 17+, where the application builder nests browser output one level deeper for the browser bundle. Look inside "dist/<project-name>/browser" instead of "dist/<project-name>" — that's the folder to deploy.
Does Angular routing (RouterModule) work after deploying?
Yes, for the default hash-free routing strategy — harvis falls back to your index.html for paths it doesn't recognize as files, which is what a direct visit to a deep route needs to resolve.
Angularアプリをharvisにデプロイするのは本当に無料ですか?
はい、クレジットカードは不要です。無料枠は1サイトあたり500ファイル・50 MBで、静的なAngularのビルドなら十分すぎるほどです。公開したサイトに有効期限はなく、削除するまで公開され続けます。
デプロイしたAngularサイトに独自ドメインは使えますか?
どのサイトも無料のharvis.devアドレスが割り当てられ、オーナー登録後にダッシュボードから好きなサブドメインを選べます(ランダムな名前の代わりにmy-app.harvis.devのように)。すでに持っている独自ドメイン(mystore.comなど)をサイトに向ける機能は、まだ用意されていません。
AngularをVercelやNetlifyにデプロイするのと何が違いますか?
VercelやNetlifyは、Gitリポジトリを接続してビルドを自分たちのサーバー上で実行し、ダッシュボードで設定する仕組みが中心です。harvisはそれをすべて省略します。ローカル(または自分のCI)でビルドし、出力フォルダに対してCLIコマンドを1つ実行するだけでリンクが手に入ります — プロジェクトの設定も、サイトを残しておきたくなるまでのアカウントも不要です。
別のものをデプロイしますか?
手順はどれでも同じです — ビルドしてから、出力フォルダをnpx harvis deployするだけ。