The simple webapp to answer the tough question.
The source code for whens.best.
First you will need to create a new KV namespace on Cloudflare Workers. You can view the official documentation for more information.
Once you have created a KV namespace, you will then need to bind it to your Cloudflare Pages project.
You will also need to set up the build configuration for Eleventy. There should be a preset to pick from, or alternatively set the build command to npx @11ty/eleventy
and the output directory to _site
.
This app is designed to be run on Cloudflare Workers, but to run the app locally for development purposes, you will first need to install the apps dependencies:
npm install
Then you can run the following commands to start the app:
npx @11ty/eleventy # To build the site
npx wrangler pages dev _site/ --kv=WHENS_BEST # To start the server