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" จาก root ของโปรเจกต์คุณ ไม่ต้องตั้งค่าและไม่ต้องล็อกอินสำหรับการดีพลอยครั้งแรกนี้ — คุณจะได้ URL ใช้งานจริงทันที พร้อมลิงก์ claim ส่วนตัวเพื่อผูกไซต์เข้ากับบัญชีฟรีเมื่อคุณพร้อม

ดีพลอย Next.js ด้วยคำสั่งเดียว

Build โปรเจกต์ของคุณ แล้วส่งโฟลเดอร์ output ให้ harvis ไม่ต้องมีบัญชีสำหรับการดีพลอยครั้งแรก — คุณจะได้ลิงก์ใช้งานจริงและลิงก์ claim ส่วนตัวเพื่อจัดการภายหลัง

terminal
npm run build
npx harvis deploy out

อยากลากไฟล์แทนเทอร์มินัลไหม? Build โปรเจกต์แล้ว วางโฟลเดอร์ output ที่นี่ แล้วเผยแพร่แบบเดียวกัน

คำถามเกี่ยวกับการดีพลอย 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 ต่อไซต์ ซึ่งเพียงพอมากสำหรับ static build ของ Next.js ไซต์ที่เผยแพร่แล้วไม่มีวันหมดอายุ — จะออนไลน์อยู่จนกว่าคุณจะลบมัน

ฉันใช้โดเมนของตัวเองกับไซต์ Next.js ที่ดีพลอยแล้วได้ไหม?

ทุกไซต์จะได้ที่อยู่ harvis.dev ฟรี และคุณเลือก subdomain ของตัวเองจากแดชบอร์ดได้หลังจาก claim — my-app.harvis.dev แทนที่จะเป็นชื่อสุ่ม การชี้โดเมนที่คุณเป็นเจ้าของอยู่แล้ว (เช่น mystore.com) มาที่ไซต์ยังไม่รองรับในตอนนี้

สิ่งนี้ต่างจากการดีพลอย Next.js ไปยัง Vercel หรือ Netlify อย่างไร?

Vercel และ Netlify สร้างขึ้นรอบการเชื่อมต่อ Git repo แล้วรัน build บนเซิร์ฟเวอร์ของพวกเขา พร้อมแดชบอร์ดสำหรับตั้งค่า harvis ข้ามขั้นตอนเหล่านั้นทั้งหมด: คุณ build ในเครื่อง (หรือใน CI ของคุณเอง) รันคำสั่ง CLI เดียวกับโฟลเดอร์ output แล้วได้ลิงก์กลับมา — ไม่ต้องตั้งค่าโปรเจกต์ และไม่ต้องมีบัญชีจนกว่าคุณจะอยากเก็บไซต์ไว้

other frameworks

กำลังดีพลอยอย่างอื่นอยู่?

สูตรเดียวกันทุกที่ — build แล้ว npx harvis deploy โฟลเดอร์ output