A tool for converting Next.js projects from Vercel to Cloudflare.
Diverce helps you migrate your Next.js projects from Vercel to Cloudflare by:
- Converting your project to use
@opennextjs/cloudflare
- Creating/updating
wrangler.jsonc
configuration - Removing any references to
@cloudflare/next-on-pages
or edge runtime - Updating
package.json
scripts for Cloudflare deployment - Adding necessary configuration files
- Node.js 18+
- A Vercel account with Next.js projects
- A Cloudflare account
-
Clone this repository:
git clone https://github.com/ygwyg/diverce.git cd diverce
-
Install dependencies:
npm install
-
Set up your Vercel API token:
cp .env.local.example .env.local
Then edit
.env.local
and add your Vercel API token, which you can create at https://vercel.com/account/tokens -
Start the development server:
npm run dev
-
Visit http://localhost:3000 to use the app
- Visit the dashboard to see your Vercel Next.js projects
- Select the project you want to convert
- Configure conversion options:
- Enable KV Cache (optional)
- Create a new branch (recommended)
- Commit and push changes (optional)
- Start the conversion process
- Follow the logs to monitor progress
- Once completed, follow the instructions to deploy to Cloudflare
npm run dev
- Start the development servernpm run build
- Build the application for productionnpm start
- Start the production server
MIT