Next.js

अपनी Next.js ऐप डिप्लॉय करें

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.

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

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

  3. 03

    इसे डिप्लॉय करें

    अपने प्रोजेक्ट रूट से "npx harvis deploy out" चलाएँ। इस पहले डिप्लॉय के लिए कोई कॉन्फ़िग और कोई लॉगिन नहीं चाहिए — आपको तुरंत एक लाइव URL मिलता है, साथ ही जब चाहें साइट को मुफ़्त अकाउंट से जोड़ने के लिए एक प्राइवेट क्लेम लिंक।

Next.js को एक कमांड से डिप्लॉय करें

अपना प्रोजेक्ट बनाएँ, फिर आउटपुट फ़ोल्डर harvis को सौंप दें। पहले डिप्लॉय के लिए किसी अकाउंट की ज़रूरत नहीं — आपको एक लाइव लिंक और बाद में इसे मैनेज करने के लिए एक प्राइवेट क्लेम लिंक मिलेगा।

terminal
npm run build
npx harvis deploy out

टर्मिनल के बजाय फ़ाइलें खींचना पसंद है? प्रोजेक्ट बनाएँ, फिर आउटपुट फ़ोल्डर यहाँ ड्रॉप करें और इसे उसी तरह पब्लिश करें।

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.

क्या Next.js ऐप को harvis पर डिप्लॉय करना सच में मुफ़्त है?

हाँ, कोई कार्ड नहीं चाहिए। मुफ़्त सीमाएँ 500 फ़ाइलें और 50 MB प्रति साइट हैं, जो एक स्टैटिक Next.js बिल्ड के लिए काफ़ी जगह देती हैं। पब्लिश की गई साइट्स एक्सपायर नहीं होतीं — जब तक आप उन्हें डिलीट नहीं करते, वे लाइव रहती हैं।

क्या मैं डिप्लॉय की गई Next.js साइट के साथ अपना खुद का डोमेन इस्तेमाल कर सकता हूँ?

हर साइट को एक मुफ़्त harvis.dev एड्रेस मिलता है, और क्लेम करने के बाद आप डैशबोर्ड से अपनी पसंद का सबडोमेन चुन सकते हैं — रैंडम की बजाय my-app.harvis.dev जैसा कुछ। आपके पास पहले से मौजूद किसी डोमेन (जैसे mystore.com) को साइट पर पॉइंट करना अभी सपोर्टेड नहीं है।

यह Next.js को Vercel या Netlify पर डिप्लॉय करने से कैसे अलग है?

Vercel और Netlify एक Git रेपो को कनेक्ट करने और आपका बिल्ड उनके सर्वर पर चलाने पर बने हैं, साथ में इसे कॉन्फ़िगर करने के लिए एक डैशबोर्ड। harvis यह सब छोड़ देता है: आप लोकली (या अपने CI में) बिल्ड करते हैं, आउटपुट फ़ोल्डर पर एक CLI कमांड चलाते हैं, और एक लिंक पाते हैं — कोई प्रोजेक्ट सेटअप नहीं, और साइट रखने तक कोई अकाउंट नहीं चाहिए।

other frameworks

कुछ और डिप्लॉय कर रहे हैं?

तरीका हर जगह एक जैसा है — पहले बनाएँ, फिर npx harvis deploy से आउटपुट डिप्लॉय करें।