Skip to content

Latest commit

 

History

History
23 lines (20 loc) · 1.94 KB

File metadata and controls

23 lines (20 loc) · 1.94 KB

Deployment on Cloudflare Pages

  1. Fork the repository to your GitHub account.

  2. Create a project in Cloudflare Pages.

  3. Select the Sink repository and choose the Nuxt.js preset.

  4. 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 least Account.Account Analytics permission. See reference.
  5. Save and deploy the project.

  6. Cancel the deployment, then go to Settings -> Bindings -> Add:

    • KV Namespace: Bind the variable name KV to a KV namespace (create a new one under Storage & Databases -> KV).
    • Workers AI (Optional): Bind the variable name AI to the Workers AI Catalog.
    • Analytics Engine:
      • In Workers & Pages, go to Account details in the right panel, locate Analytics Engine, and click Set up to enable the free tier.
      • Return to Settings -> Bindings -> Add and select Analytics engine.
      • Bind the variable name ANALYTICS to the sink dataset.
  7. Add Compatibility flags

    • Go to Settings -> Runtime -> Compatibility flags and set the following flags nodejs_compat.
  8. Redeploy the project.

  9. To update code, refer to the official GitHub documentation Syncing a fork branch from the web UI.