-
Fork the repository to your GitHub account.
-
Create a project in Cloudflare Pages.
-
Select the
Sinkrepository and choose theNuxt.jspreset. -
Configure the following environment variables:
NUXT_SITE_TOKEN: Must be at least 8 characters long. This token grants access to your dashboard.NUXT_CF_ACCOUNT_ID: Find your account ID.NUXT_CF_API_TOKEN: Create a Cloudflare API token with at leastAccount.Account Analyticspermission. See reference.
-
Save and deploy the project.
-
Cancel the deployment, then go to Settings -> Bindings -> Add:
- KV Namespace: Bind the variable name
KVto a KV namespace (create a new one under Storage & Databases -> KV). - Workers AI (Optional): Bind the variable name
AIto the Workers AI Catalog. - Analytics Engine:
- In Workers & Pages, go to Account details in the right panel, locate
Analytics Engine, and clickSet upto enable the free tier. - Return to Settings -> Bindings -> Add and select Analytics engine.
- Bind the variable name
ANALYTICSto thesinkdataset.
- In Workers & Pages, go to Account details in the right panel, locate
- KV Namespace: Bind the variable name
-
Add Compatibility flags
- Go to Settings -> Runtime -> Compatibility flags and set the following flags
nodejs_compat.
- Go to Settings -> Runtime -> Compatibility flags and set the following flags
-
Redeploy the project.
-
To update code, refer to the official GitHub documentation Syncing a fork branch from the web UI.