Testing Cloudflare Pages + a Pages Function (Worker) to handle form submissions.
Unlike Netlify, Cloudflare has no built-in form handling — you write a small backend function.
The file functions/api/contact.js is automatically deployed as a Cloudflare Worker
when you push to Pages. It runs at the edge in 300+ cities. No server, no Docker, no Nginx.
In this test, it saves to KV storage (Cloudflare's key-value store) instead of sending
a real email, so you can verify the plumbing without an email API key.
To call Brevo for real, you'd replace the KV write with a fetch() to Brevo's API.
/api/contact processed this form.
Check the KV namespace in your Cloudflare dashboard to see the stored data,
or add your Brevo API key to the Worker to send a real email.
FORM_SUBMISSIONSFORM_KVNOTIFICATION_EMAIL = your email addressfunctions/api/contact.js with a fetch() to Brevo API