Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 871 Bytes

File metadata and controls

34 lines (23 loc) · 871 Bytes

vinext-demo

A small Next.js app migrated to vinext — Cloudflare's Vite-based reimplementation of the Next.js API surface.

Companion repo for the article: ViNext: Next.js Rebuilt on Vite

What it exercises

  • Server Components — the home page is a server component
  • Server Actions — the guestbook form submits via "use server"
  • ISR — the visitors page revalidates every 30 seconds
  • API Route/api/visitors returns JSON

Running locally

npm install
npm run dev

Deploy to Cloudflare Workers

npm run deploy

Deploy to a VPS with Docker

docker build -t vinext-demo .
docker run -p 3000:3000 vinext-demo

Or connect this repo to Dokploy and point it at the Dockerfile.