1

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?

Chris Porter
  • 143
  • 1
  • 13
  • You need rework this question a bit. For example, what did you try? I assume you created an account, added a webtask, and attempted to recreate what is documented. And I assume something failed there. Can you share that? – Raymond Camden Jun 21 '18 at 18:43

1 Answers1

1

It should be pretty much the same thing, except that the author in this tutorial is:

  1. 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).

  2. 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:

$ wt create index.js --bundle --meta wt-compiler=webtask-tools/express
Gunar Gessner
  • 2,331
  • 23
  • 23