-
Notifications
You must be signed in to change notification settings - Fork 378
Getting Started
- a GitHub account
- a Cloudflare account (free plan is enough for this usage)
- 15 minutes of time
- [Optional] a domain if you want to use custom domain (via CNAME)
-
Fork this repo to your own account. (Maybe btw give it a star before forking? :3)
You can leave all the options as default, change the repo name if you want.
-
Edit
config/site.config.js
and modify the options to your need. TODO: doc -
Login into your cloudflare, navigate to
Workers & Pages - Overview
and create a new application.Choose
Pages
and click onConnect to Git
button.Connect your GitHub account to Cloudflare via OAuth and grant permissions on your forked repo. Choose your forked repo to continue.
Choose
Next.js
framework preset and leave other options as default, click onSave and Deploy
.Wait for the building process to finish, should finish in ~2min. Then click on
Continue to project
.Now visiting the domain provided by Cloudflare (
xxx.pages.dev
) should return something likeError: Could not access built-in Node.js modules. Please make sure that your Cloudflare Pages project has the 'nodejs_compat' compatibility flag set.
So let's continue to do that.
-
Change settings and bind KV storage