Workers and KV – learning by example
Before we start learning how to use Workers, first, you need to have an account with Cloudflare, and then sign up for Cloudflare Workers. Workers has a free plan that should be enough for you to play around with different workers. When you choose your plan and set up your account for Workers, you will also need to have a domain that your workers can be published to. You can either choose to have your own domain, which you can add to your Cloudflare account and manage, or sign up for a free subdomain under the worker.dev
domain. For this chapter, I am going to use the safeer.workers.dev
subdomain, which I have signed up for already.
If you want to test how to write Worker code without setting up your account or the necessary tooling, you can try out the Cloudflare playground. The Cloudflare playground is a web-based UI that is available at https://cloudflareworkers.com. This UI helps you write Worker code and test it with additional input...