Guide

Cloudflare deployment notes

Deploy BotConsent to Cloudflare Pages with a static build and Pages Functions for form handling.

Build settings

  • Framework preset: Astro.
  • Build command: npm run build.
  • Output directory: dist.
  • Root directory: repository root.

Functions

The contact endpoint lives in the root functions directory. Cloudflare Pages maps functions/api/contact.ts to /api/contact during deployment.

Domain

Attach botconsent.com as the production custom domain, then attach www.botconsent.com and redirect one hostname to the other. This project recommends apex as canonical.