how i use env vars on server and client? #13371
Unanswered
real-mrbot
asked this question in
Q&A
Replies: 1 comment
-
Pass them as an argument And to use them client side return them from a loader In latest versions of wrangler you can import env from cloudflare:workers https://developers.cloudflare.com/changelog/2025-03-17-importable-env/ |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
i am deploying on cloudfare workers, currently accessing it form vars defined in wrangler.jsonc, via context.cloudfare.env, but sometimes i need to access this from outsidte of the function, i couldn't figured it out.
i checked cloudfare and remix docs, i found .dev.vars file, but i don't know how to access it in app.
and i don't wants to commit the env vars in repo, which is problem when using vars inside wrangler.jsonc
Beta Was this translation helpful? Give feedback.
All reactions