kooliebwoykg
CDCloudflare Developers
•Created by Soly on 11/12/2024 in #pages-help
How do I read environment variables from a SvelteKit website?
.env in local. Whatever I define there, I also place a copy in wrangler.toml for production. Plaintext only. The secrets, I set with put cli command.
18 replies
CDCloudflare Developers
•Created by Soly on 11/12/2024 in #pages-help
How do I read environment variables from a SvelteKit website?
Hey, @apolodoro ! Same thing applies. I've actually switched from pages to workers static assets and my codebase remained the same outside of the adapter and relying more on the wrangler.toml. Define your plaintext environment as vars in wrangler.toml/json and set secrets with the cli and you should be all sorted. Doing this ensures nothing is overwritten on deployments.
18 replies
CDCloudflare Developers
•Created by brownfox.dev on 11/28/2024 in #pages-help
import.meta.env in cloudflare pages
If you're using Astro and Pages then I think this is what you're looking for.
https://docs.astro.build/en/guides/integrations-guide/cloudflare/#cloudflare-runtime
3 replies
CDCloudflare Developers
•Created by Soly on 11/12/2024 in #pages-help
How do I read environment variables from a SvelteKit website?
Lol. Sounds about right. Just gotta add the variables to the preview env. So any updates to variables should be done both on preview and prod.
18 replies
CDCloudflare Developers
•Created by Soly on 11/12/2024 in #pages-help
How do I read environment variables from a SvelteKit website?
Sounds like you've already done half of the work. Once it's defined in the dashboard then use dynamic private for runtime. That's all there is to it.
https://svelte.dev/docs/kit/$env-dynamic-private
18 replies
CDCloudflare Developers
•Created by kooliebwoykg on 9/27/2024 in #d1-database
I switched and couldn't believe how easy
Multi-tenancy is the only reason I am using Turso. That's the only feature they have over D1.
4 replies