abvfx
abvfx
CDCloudflare Developers
Created by abvfx on 9/14/2023 in #workers-help
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);
1 replies