ASchmidIT
ASchmidIT
CDCloudflare Developers
Created by ASchmidIT on 11/10/2023 in #pages-help
Remix, Cloudflare Pages and Context/Env variables
I am working on a project with Remix and Cloudflare Pages. So far everything works fine but I can't figure out how I access context or environment variables in loader functions on Cloudflare Functions (server side). For example I want to access KV in a Cloudflare function that is called from a loader function in Remix. Everything I have tried (context.env.KV_NAME or env.KV_NAME) doesn't work in my server.ts file. Does anyone know how I access the context or env in a Cloudflare Function in a Remix project?
8 replies