Vanessaš¦©
06/18/2021, 10:20 PMWebSocket.send()
accepts those, but the Cloudflare docs explicitly state string
as argument. (I can just try, but the docs should be fixed too)maxastuart
06/18/2021, 10:21 PMVanessaš¦©
06/18/2021, 10:22 PMmaxastuart
06/18/2021, 10:23 PMmaxastuart
06/18/2021, 10:31 PMgraphql-transport-ws
(the newer websocket protocol for graphql)?Greylock
06/19/2021, 4:56 PMGreylock
06/19/2021, 4:56 PMalbert
06/20/2021, 11:08 AMClient -> Durable Object -> Backblaze B2
data transfer would not incur any charges, right?Mallissin
06/20/2021, 4:33 PMJosh
06/20/2021, 4:34 PMJosh
06/20/2021, 4:34 PMJosh
06/20/2021, 4:34 PMMallissin
06/20/2021, 4:35 PMalbert
06/20/2021, 5:11 PMMallissin
06/20/2021, 7:29 PMalbert
06/20/2021, 7:57 PMMallissin
06/20/2021, 8:22 PMsteranevdy
06/21/2021, 5:22 AMAliHaider
06/21/2021, 6:33 AMaiddun
06/21/2021, 6:49 AMalbert
06/21/2021, 1:55 PMalbert
06/21/2021, 1:56 PMcharl
06/21/2021, 6:42 PMWallacy
06/22/2021, 2:08 PMJames
06/22/2021, 2:22 PMWallacy
06/22/2021, 2:59 PMrjs
06/22/2021, 11:27 PMwrangler.toml
that looks like this:
name = "classdojo-clubs-server"
# type = "javascript" is required to use the `[build]` section
type = "javascript"
account_id = "my_account_id"
zone_id = "my_zone_id"
# route = ""
workers_dev = true
usage_model = "unbound"
vars = { ENVIRONMENT = "development" }
[dev]
local_protocol="https"
[build]
command = "yarn install && yarn build"
[build.upload]
# The "modules" upload format is required for all projects that export a Durable Object class.
format = "modules"
dir = "./build"
main = "./index.mjs"
[env.production]
vars = { ENVIRONMENT = "production" }
[env.staging]
vars = { ENVIRONMENT = "staging" }
[durable_objects]
bindings = [
{ name = "rooms", class_name = "Room" },
]
When I run wrangler dev
and log env
from a fetch handler, it looks like:
{ ENVIRONMENT: "development", rooms: {} }
ā¦which is what I would expect. However, when I run the same on staging or production, env.rooms
is undefined.
Do I need to explicitly define durable objects per environment in wrangler.toml
(something like [env.production.durable_objects]
)? My intuition says no, but then I'm not sure why env.rooms
is undefined in staging and production.
Any help would be super appreciated, thank you!carlson
06/22/2021, 11:34 PMmaxbittker
06/22/2021, 11:35 PM[env.production.durable_objects]