Yongkie Wiyogo
Yongkie Wiyogo
CDCloudflare Developers
Created by Yongkie Wiyogo on 2/22/2025 in #pages-help
How to read environment variable from CF Dashboard in Astro?
I tried to read my env variables using const supabaseUrl = import.meta.env.SUPABASE_URL; and it doesn't work. In https://docs.astro.build/en/guides/integrations-guide/cloudflare/#cloudflare-runtime, it shows const { env } = Astro.locals.runtime;. However, I have a compiler error that Astro is not defined. How can I import this Astro variable?
1 replies