niche internet micro celebrity
niche internet micro celebrity
CDCloudflare Developers
Created by niche internet micro celebrity on 3/6/2024 in #workers-help
"[Error: Network connection lost.]"
I have a KV - which I will be used for keeping track of domains, I have assigned it to the Worker, and pasted the toml from the site into my wrangler.toml - everything works fine after I deploy it, and test it there, however, when running locally, I get this:
[Error: Network connection lost.]
[Error: Network connection lost.]
Code:
await req.env.DOMAINS.put(body.domain, "-1");
await req.env.DOMAINS.put(body.domain, "-1");
wrangler.toml:
[[kv_namespaces]]
binding = "DOMAINS"
id = ""
preview_id = ""
[[kv_namespaces]]
binding = "DOMAINS"
id = ""
preview_id = ""
Everything works fine once deployed, but when using wrangler dev, it's throwing the error above
2 replies