#Deploying on cloudflare? what are the best practise to deal with env variables?
4 messages · Page 1 of 1 (latest)
This might be helpful to you: https://developers.cloudflare.com/workers/framework-guides/web-apps/tanstack/
It's good to know that env vars and secrets are exposed on process.env for newer cloudflare workers (along with other bindings).
You can also import the env bindings from the workers:cloudflare package, which for now only works in production afaik. This might change when Tanstack Start decouples from Nitro and we can use the official Cloudflare Vite plugin instead:
import { env } from "cloudlfare:workers"