-
I am setting up my delegate access token and need to save is as a secret. On Cloudflare workers, environment variables are passed to handler, which is defined in the worker.js for a hydrogen app
how do I reference env in Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
what I did now is create a singleton like object and reference the object in both place. I wonder there is more preferred way for shopify config to get information about the request/handler |
Beta Was this translation helpful? Give feedback.
-
When deploying to a platform different from Oxygen, you need to polyfill the global |
Beta Was this translation helpful? Give feedback.
When deploying to a platform different from Oxygen, you need to polyfill the global
Oxygen.env
with something like this. Then, it should be possible to referenceOxygen.env.MY_VARIABLE
fromhydrogen.config.js
without issues.