I ended up using `env DO CLASS get key `

I ended up using env.DO_CLASS.get(key), is that okay or should I use proxyDurable?
6 Replies
aarhus
aarhus•2y ago
that is just the raw DO, you need the proxy to get the itty wrapper import { proxyDurable } from 'itty-durable'
sathoro
sathoroOP•2y ago
it seemed to work though. maybe it is already wrapped before I used withDurables()?
aarhus
aarhus•2y ago
Yes, I missed that bit
sathoro
sathoroOP•2y ago
ah okay, thanks for helping 😄
aarhus
aarhus•2y ago
The proxyDurable is for when you want to access a DO in a non fetch (i.e. cron, queue, alarm)
sathoro
sathoroOP•2y ago
ahh yes that makes sense and is good to know as I will be needing that soon. thanks!
Want results from more Discord servers?
Add your server