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)
}
Was this page helpful?