Deploy aplikasi Angular kamu
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
Deploy
Jalankan "npx harvis deploy dist/<project-name>/browser" 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 Angular 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.
ng build npx harvis deploy dist/<project-name>/browser
Lebih suka menyeret file daripada terminal? Build proyek kamu, lalu lepas folder output di sini dan publikasikan dengan cara yang sama.
Pertanyaan deploy 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.
Apakah men-deploy aplikasi Angular 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 Angular dengan banyak ruang tersisa. Situs yang dipublikasikan tidak kedaluwarsa — situs itu tetap live sampai kamu menghapusnya.
Bisakah saya memakai domain sendiri untuk situs Angular 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 Angular 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.