hyperknot
hyperknot
Explore posts from servers
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?
Is it versions? Or deployments?
4 replies
SSolidJS
Created by hyperknot on 9/27/2024 in #support
Questions about migrating from MobX
Thank you Alex! Sorry, I wasn't clear, I'd never use classes for that kind of use. I simply want to have my store in a class, like this:
class ChatStore {
constructor() {
const [state, setStore] = createStore({
apiKey: localStorage.getItem('apiKey') || '',
messages: [],
currentMessage: '',
isStreaming: false,
})

this.state = state
this.setStore = setStore
}

setStoreOnce(updater) {
this.setStore(produce(updater))
}

resetChat() {
this.setStoreOnce((s) => {
s.messages = []
s.currentMessage = ''
s.isStreaming = false
})
}
class ChatStore {
constructor() {
const [state, setStore] = createStore({
apiKey: localStorage.getItem('apiKey') || '',
messages: [],
currentMessage: '',
isStreaming: false,
})

this.state = state
this.setStore = setStore
}

setStoreOnce(updater) {
this.setStore(produce(updater))
}

resetChat() {
this.setStoreOnce((s) => {
s.messages = []
s.currentMessage = ''
s.isStreaming = false
})
}
It works well, but I don't know how much is it a pattern / antipattern in Solid land.
4 replies
CDCloudflare Developers
Created by hyperknot on 8/2/2024 in #wrangler
Hi, `wrangler versions` is not working
Found it, needs --x-versions
1 replies
CDCloudflare Developers
Created by hyperknot on 6/20/2024 in #general-help
R2 down, some buckets are inaccessible
Yes, that's it I believe.
3 replies
CDCloudflare Developers
Created by hyperknot on 6/9/2024 in #workers-help
Specify host header in fetch request
I moved to Python and host it on a VM, gave up on CF workers for this.
13 replies
CDCloudflare Developers
Created by hyperknot on 6/9/2024 in #workers-help
Specify host header in fetch request
I see, thanks for the help!
13 replies
CDCloudflare Developers
Created by hyperknot on 6/9/2024 in #workers-help
Specify host header in fetch request
I see. It's a bit weird, as the non-JS runtimes can support anything I guess. Like if I write it in Python then I'm allowed to do whatever I want, but if I choose the native JS runtime then I'm in this security sandbox kind of thing?
13 replies