hyperknot
hyperknot
Explore posts from servers
CDCloudflare Developers
Created by hyperknot on 12/8/2024 in #general-help
I don't get Email Routing
I don't get Cloudflare Email Routing. It can only be added to domains without MX records. What are those domains? Why would anyone have domains without MX records, other than "parked" or empty domains? Normally you use Cloudflare with the primary, company domain, where MX records are definitely configured already, with Google Workspace or similar. How would you use Email Routing with those?
3 replies
CDCloudflare Developers
Created by hyperknot on 12/7/2024 in #workers-help
How do I list contents of local KV?
I'm running wrangler dev. I get this on startup:
Your worker has access to the following bindings:
- KV Namespaces:
- KV: 592fd8e6d8a94899b50f6b7e7aba4036 (local)
Your worker has access to the following bindings:
- KV Namespaces:
- KV: 592fd8e6d8a94899b50f6b7e7aba4036 (local)
How can I list all the contents of this KV? If I try in a new terminal tab:
pnpm wrangler kv:key list --local --binding=KV
pnpm wrangler kv:key list --local --binding=KV
it returns []. So does it when I try:
pnpm wrangler kv:key list --binding=KV --preview
pnpm wrangler kv:key list --binding=KV --preview
The items are present, from inside the worker I can console.log them. Only from terminal/wrangler I cannot access them.
list = await env.KV.list()
for (const key of list.keys) {
const value = await env.KV.get(key.name)
console.log(`Key: ${key.name}, Value:`, value)
}
list = await env.KV.list()
for (const key of list.keys) {
const value = await env.KV.get(key.name)
console.log(`Key: ${key.name}, Value:`, value)
}
What am I doing wrong?
1 replies
SSolidJS
Created by hyperknot on 11/25/2024 in #support
Which styling library to use?
Hi, I've read the docs, checked out many website and I just got totally confused which styling library to use with Solid + Vite. - macaron - https://macaron.js.org/ doesn't work, terminates with babel error. - https://github.com/solidjs/solid-styled-components 2 yr no commits - https://github.com/solidjs/solid-styled-jsx 2 yr no commits, however the main library it refers to still gets updates - Panda CSS works but is a mess which tries to overtake everything. - Pigment CSS doesn't support Solid, just React ATM - should I use CSS modules in separate files? Sometimes I'd love to have it colocated with the component code, not in a separate file. - linaria has an open PR, anyone used it? https://github.com/callstack/linaria/pull/1096
15 replies
CDCloudflare Developers
Created by hyperknot on 10/30/2024 in #workers-help
How do I get the list of deployed workers like on the web UI?
With Wrangler, how do I get the list of deployed workers like on the web UI?
4 replies
SSolidJS
Created by hyperknot on 9/27/2024 in #support
Questions about migrating from MobX
Hi, SolidJS newbie here with 8 years of MobX React experience. Couple of Qs: 1. I'd like to use class-based stores whenever possible. Is there anything I need to be aware of when using them? 2. Is store performance adequate? For example, can I update a string value at 60 FPS like this?
this.setStore('message', this.state.message + content)
this.setStore('message', this.state.message + content)
3. setStore vs. setState: Here is setState, https://docs.solidjs.com/concepts/stores#path-syntax-flexibility but later on it starts recommending using setStore https://docs.solidjs.com/concepts/stores#appending-new-values 4. Is appending to an array better than setState with .push()? 5. Is there any performance advantage to using produce? If I'm using my own setter function for each value, then I cannot use produce. Is there any disadvantage to this?
4 replies
CDCloudflare Developers
Created by hyperknot on 6/20/2024 in #general-help
R2 down, some buckets are inaccessible
Some public buckets don't work, web UI is also broken for them. "We encountered an internal error. Please try again. (Code: 10001)" Other buckets work.
3 replies
CDCloudflare Developers
Created by hyperknot on 6/9/2024 in #workers-help
Specify host header in fetch request
I'm trying to health-check load balanced hosts, for which I need to fetch using IP address + Host header. In curl it's super simple, like this:
curl -H "Host: direct.openfreemap.org" -I http://144.76.168.195/styles/liberty
curl -H "Host: direct.openfreemap.org" -I http://144.76.168.195/styles/liberty
However I cannot replicate the same in a Worker JS environment. For example this does not work (network connection lost):
const resp = await fetch('http://144.76.168.195/styles/liberty', {
headers: {
Host: 'direct.openfreemap.org',
},
})
const resp = await fetch('http://144.76.168.195/styles/liberty', {
headers: {
Host: 'direct.openfreemap.org',
},
})
How can I make either fetch work with Host headers, or use a lower level library for that?
13 replies