ampproject / ampproject/cloudflare-amp-optimizer
KV and workers.dev Route Errors
- Dominant language
- JavaScript
- Stars
- 23
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I have set up and published my worker to Cloudflare but there seems to be one issue I am having and that is with the KV Namespace. Below is the exact code I put in my wrangler.toml file and the KV cache is enabled via the config.json file:
```
[env.prod]
name = "the name PowerShell gave when creating the KV namespace"
route = "https://www.examplesite.com/*"
vars = { MODE = "prod" }
kv_namespaces = [
{ binding = "KV", id = "my-id" }
]
```
I created it using the `wrangler kv:namespace create "KV"` command.
I did not place a preview_id because I wasn't sure how to get one so I left it out. I only have the env.prod code for KV in the wrangler.toml file.
When viewing the worker via the console I get this error:

I am not exactly sure as to why the KV would not be defined?
Also, the workers.dev route is active but leads to an Error 523 page. Seems there is a hosting error. I am thinking I turn that off and go straight through the additional route I added instead?
Thank you in advance for any help I receive!
Thanks and regards,
Tug
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.