We opted to keep it simple and just pass `context` which we add a validated `env` onto in `server.ts

We opted to keep it simple and just pass context which we add a validated
env
onto in server.ts.

Alternatively, I know some people are using AsyncLocalStorage which means you don't have to pass it as an argument

https://developers.cloudflare.com/workers/runtime-apis/nodejs/asynclocalstorage/
https://blog.cloudflare.com/workers-node-js-asynclocalstorage/
pages-discussions
Was this page helpful?