hostname is actually a nice one, haven't thought about that.
hostname is actually a nice one, haven't thought about that.
wrangler tail -f pretty GET user://username/posts/1 is possible, if you wantIf you are in the Durable Objects open beta, you will also be able to view the logs and requests sent to each Durable Object. This is a great tool to help you understand and debug the interactions between your Worker and a Durable Object.
wrangler? I'm not sure how it maps to the underlying model - I believe it has a concept of environments, perhaps it creates one namespace per env? Not sure. You can always get a list of your DO namespaces with GET https://api.cloudflare.com/client/v4/accounts/<account-id>/workers/durable_objects/namespacesCompressionStream https://caniuse.com/mdn-api_compressionstreammoduleFileExtensions Jest option? if you are, make sure you've got "json" included in that arrayDurableObjectId isnt exported?import { DurableObjectId } from "miniflare/dist/modules/do", the next version will make it much easier to use individual components like thissetTimeout and they pretty much always fire, but not if the object needs to be destroyed (colo goes down, or service upgrade) or runs out of runtime. For the latter, I believe the cloudflare team said that they are working on an update to ensure they will fire more consistently in the future (search the scrollback), but no public docs for that yet.setTimeout for the 99% case, but also store the timer in state and have a cron that runs every minute as a fallback, the cron is guaranteed to run even if the DO is recreatedstate.storageJust curious if this is production readyDepends on your production needs. For a game, maybe. Officially, it's not even GA yet, so not production-ready from an official point of view. Not even billed yet!
wrangler tail -f prettyGET user://username/posts/1GET https://api.cloudflare.com/client/v4/accounts/<account-id>/workers/durable_objects/namespacesCompressionStreamTest suite failed to run
Cannot find module '../generated/offsets' from '../../node_modules/tz-offset/src/tz-offset.js'
Require stack:
C:/dev/me/tinkering-with-durable-objects/node_modules/tz-offset/src/tz-offset.js
C:/dev/me/tinkering-with-durable-objects/node_modules/node-cron/src/scheduled-task.js
C:/dev/me/tinkering-with-durable-objects/node_modules/node-cron/src/node-cron.js
C:/dev/me/tinkering-with-durable-objects/node_modules/miniflare/dist/index.js
src/projections/ProjectionDurableObject.test.tsmoduleFileExtensions"json"DurableObjectIdimport { DurableObjectId } from "miniflare/dist/modules/do"state.storage