manterfield
manterfield
CDCloudflare Developers
Created by manterfield on 12/5/2024 in #pages-help
How are we supposed to use env vars outside of request contexts - e.g. When setting a config value?
Update - turns out in this context I can use process.env and it 'just works'. Those variables end up being interpolated at build time - which works because at build time we're in a node env (rather than the v8 env we're in at runtime). Still left feeling that the way env vars are supported in workers produces a lot more surprises than I'd like. I hope this area is improved in future.
2 replies