Deploy aplikasi Next.js kamu
harvis serves static files, so this works for the part of Next.js that produces static files: static export. Add one line to your config, build, and the CLI takes it from there. Server-rendered routes, API routes, and middleware don't run here — there's no server behind this host.
- 01
Enable static export
Add "output: 'export'" to next.config.js. Routes using API routes, middleware, or server-side rendering won't build — everything else does.
- 02
Build the app
Run "npm run build". With static export on, Next.js writes fully rendered HTML, CSS, and JS to an "out" folder instead of starting a server.
- 03
Deploy
Jalankan "npx harvis deploy out" 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 Next.js 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 out
Lebih suka menyeret file daripada terminal? Build proyek kamu, lalu lepas folder output di sini dan publikasikan dengan cara yang sama.
Pertanyaan deploy Next.js
I use next/image or API routes. Can I still deploy here?
API routes and the default next/image loader need a server, so they don't work under static export. next/image still works if you set images.unoptimized: true (or point loader at an external image service) — everything else in the App or Pages router that doesn't touch the server builds fine.
Do dynamic routes like /blog/[slug] work with static export?
Yes, as long as they implement generateStaticParams (App Router) or getStaticPaths (Pages Router) so Next knows which pages to pre-render at build time. Routes with no way to enumerate their params ahead of time can't be static.
Apakah men-deploy aplikasi Next.js 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 Next.js dengan banyak ruang tersisa. Situs yang dipublikasikan tidak kedaluwarsa — situs itu tetap live sampai kamu menghapusnya.
Bisakah saya memakai domain sendiri untuk situs Next.js 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 Next.js 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.