Where to write Cloudflare workers functions in an Astro project?

I'm working on an e-commerce project and am trying to integrate Stripe. Where would you place a server-side endpoint in an Astro project? Does this require the astro/cloudflare adapter? The project is local. This is the type of code that needs to run on the server: import Stripe from 'stripe'; const stripe = new Stripe('sk_test_...'); const customer = await stripe.customers.create({ email: '[email protected]', }); console.log(customer.id);
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server