Skip to main content

Cloudflare Next.js Example

This example demonstrates deploying a Next.js application to Cloudflare using the Next.js adapter with KV Namespace integration.

Features

  • Next.js: Full-stack React framework with SSR and SSG
  • KV Namespace: Key-value storage for session data, caching, etc.
  • Cloudflare Pages: Automatic deployment with edge rendering

Project Setup

Key Features Explained

KV Namespace Integration

KV is bound to your Next.js application:

Edge Runtime

Next.js pages run on Cloudflare’s edge:

Adoption Mode

The adopt: true flag allows reusing existing deployments:

Source Code

View the complete source code: examples/cloudflare-nextjs