I'm trying run Remix.run with Cloudflare workers. How might I access environmental variables related to Cloudflare data persistence services (such as D1) in Remix.run data loader functions?
I have "bound" the worker via wrangler.toml and can access the service via wrangler.
[[ d1_databases ]]
binding = "DB" # i.e. available in your Worker on env.DB
database_name = "Example"
database_id = "123-456-789"
I'm able to access other environmental variables from the global scope using .env.vars but can't seem to access DB.