/plushcap/analysis/cloudflare/api-at-the-edge-workers-and-firestore

Writing an API at the Edge with Workers and Cloud Firestore

What's this blog post about?

The text discusses the development of a system for reserving custom subdomains on the upcoming platform, Workers.dev. This involves creating two distinct Worker scripts to handle email verification and subdomain reservation processes. Google Cloud Platform's Firestore is used as the database due to its immediate consistency feature which prevents double-reservations. The text also explains how JWTs are generated for authentication requests to the Firestore API, and how these are stored in KV (Cloudflare’s Key-Value data store). Lastly, it mentions that users can reserve a workers.dev subdomain even if they don't have a domain on Cloudflare.

Company
Cloudflare

Date published
March 21, 2019

Author(s)
Ashley M Lewis

Word count
2226

Hacker News points
None found.

Language
English


By Matt Makai. 2021-2024.