ShaharMS
CDCloudflare Developers
•Created by ShaharMS on 8/20/2024 in #pages-help
Run a nodejs script right before website is deployed to transform the website's content
my website is multilingual, and i do it by running a script on my project that transforms it into multiple folders, each for a different language.
I run that script during development to view my website, but is there a way to do that in cloudflare?
17 replies
CDCloudflare Developers
•Created by ShaharMS on 7/30/2023 in #workers-help
env.KV_NAMESPACE.put(...) never actually writes anything
i might be dong this icorrectly, if so, please tell me:
i connected the KV to my worker in the toml file. that also shows up on cloudflare's website. whenever the user sends json data, it should get written:
even though requestData is defined, and groupCal gets written to, it seems like GROUP_CAL isnt getting written to, since when returning the new site (or even retrieving it a couple minutes after the
put
), and writing from
GROUP_CAL
to groupCal
, the result is always {}
:
what am i doing wrong?25 replies
CDCloudflare Developers
•Created by ShaharMS on 7/30/2023 in #workers-help
How do i create a working wrangler.toml file from quickedit?
I'm using cloudflare workers, and im editing my worker with cloudflare's Quick Edit. when just using
env.MY_KV_NAMESPACE
, couldnt get the values in it, so i figured i should create a wrangler.toml file. when i do create one, and put the 3 required fields, along with the kv namespace, it doesnt work, and sends error:
what am i doing wrong? if im creating the file wrong, how do i do it correctly from quickedit?4 replies