How to access environment variables in helper functions ?

I am using Remix with Cloudflare Pages. I have a helper function mentioned below. Can you suggest how to access the environment variable outside the loader, action ?
export async function internalAPI(url: string, options: FetchOptions = {}) {

return await baseAPI(process.env.SERVER_BASE_DOMAIN, url, options)
}
export async function internalAPI(url: string, options: FetchOptions = {}) {

return await baseAPI(process.env.SERVER_BASE_DOMAIN, url, options)
}
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server