https://discord.cloudflare.com logo
Join Discord
Powered by
# durable-objects
  • k

    Kevin W - Itty

    04/04/2021, 2:59 PM
    (of millions)
  • e

    eidam | SuperSaaS

    04/04/2021, 2:59 PM
    😄
  • k

    Kevin W - Itty

    04/04/2021, 3:01 PM
    how are you guys handling the routing within the DO?
  • e

    eidam | SuperSaaS

    04/04/2021, 3:01 PM
    itty-router
  • k

    Kevin W - Itty

    04/04/2021, 3:01 PM
    inside the fetch function, embedding a router in the object (E.g. constructor) or what?
  • v

    vans163

    04/04/2021, 3:02 PM
    Hahaha just rhetorical reasoning, dont mind my blabber😂
  • k

    Kevin W - Itty

    04/04/2021, 3:04 PM
    ignore the dirty GET for create
  • k

    Kevin W - Itty

    04/04/2021, 3:05 PM
    like... that's kinda clean-ish for having a blasted router inside, but it still just feels dirty
  • k

    Kevin W - Itty

    04/04/2021, 3:06 PM
    fetch call is abstracted away, as is initialize and persist functions (to/from storage)
  • g

    Greg Brimble | Cloudflare Pages

    04/04/2021, 3:06 PM
    https://discord.com/channels/595317990191398933/773219443911819284/828216285568565258
  • e

    eidam | SuperSaaS

    04/04/2021, 3:07 PM
    💯 thats very similar to mine 🙂
  • k

    Kevin W - Itty

    04/04/2021, 4:52 PM
    anyone have a clean example of a nested DO like we've been talking about? where the parent keeps track of child instances?
  • i

    IAmKale

    04/04/2021, 5:56 PM
    Do DO’s support expiring values? I love that about Redis, for temporarily persisting authorization challenges
  • g

    Greg Brimble | Cloudflare Pages

    04/04/2021, 5:59 PM
    Not yet: https://discord.com/channels/595317990191398933/773219443911819284/813428039551418368
  • j

    jmshal

    04/04/2021, 6:43 PM
    Are custom routes (using a domain) supported with Durable Objects? I haven’t been able to find anything online about this.
  • g

    Greg Brimble | Cloudflare Pages

    04/04/2021, 6:43 PM
    Yes.
  • j

    jmshal

    04/04/2021, 6:44 PM
    Weird... I can’t seem to get that to work at all.
  • g

    Greg Brimble | Cloudflare Pages

    04/04/2021, 6:44 PM
    Should work just as normal.
    zone_id
    and `routes`/`route` in
    wrangler.toml
    .
  • g

    Greg Brimble | Cloudflare Pages

    04/04/2021, 6:44 PM
    (Not under the
    durable_objects
    section.)
  • j

    jmshal

    04/04/2021, 6:44 PM
    Oh maybe the difference is I’m using environments. Is that supported?
  • j

    jmshal

    04/04/2021, 6:45 PM
    Something I’m doing is not right haha.
  • j

    jmshal

    04/04/2021, 6:45 PM
    Trying to get to the bottom of it 😅
  • g

    Greg Brimble | Cloudflare Pages

    04/04/2021, 6:46 PM
    Should be! You using the custom builds RC?
  • j

    jmshal

    04/04/2021, 6:46 PM
    Yeah
  • j

    jmshal

    04/04/2021, 6:46 PM
    I can get it to work if I deploy to workers.dev.
  • j

    jmshal

    04/04/2021, 6:47 PM
    But it just flat out fails to add the DO namespace to the env object when I deploy using environments & custom routes.
  • j

    jmshal

    04/04/2021, 6:47 PM
    My understanding of environments is that they are exactly the same but have the environment name appended to the end.
  • g

    Greg Brimble | Cloudflare Pages

    04/04/2021, 6:48 PM
    Can you dump your
    wrangler.toml
    here?
  • j

    jmshal

    04/04/2021, 6:48 PM
    So in theory it's probably not environments screwing things up for me.
  • j

    jmshal

    04/04/2021, 6:48 PM
    Yeah sure
1...474849...567Latest