I've been working for days on implementing Stripe Checkout into my static site. My static site is generated by React. There is a tutorial for setting up Stripe Checkout using React, however I also need to move the backend function to webtask.
Here is the tutorial. https://www.robinwieruch.de/react-express-stripe-payment/#express-stripe-backend
Any idea on how to port this over to webtask?
It should be pretty much the same thing, except that the author in this tutorial is:
Exporting an express server. To use that with webtask you're going to need to explicitly define the programming model with the argument
--meta wt-compiler=webtask-tools/express
(or you can use webtask-tools).Splitting the code into multiple files. Luckily
wt-cli
provides a bundler so it's just a matter of providing the--bundle
argument.So the final command line becomes: