Repo to play with this demo.
The best way to get that running is to use the Striple CLI as per this instruction (this will populate server/.env
which I had to hide in .gitignore
)
Steps I had to do to get it working on Heroku:
-
Make a Heroku app:
heroku create ...
-
Define a Python version:
echo python-3.9.1 > runtime.txt
-
I had to remove the
Gemfile
, otherwise Heroku would think it was a Ruby app. -
Copy
server/requirements.txt
torequirements.txt
andpip install
+ addgunicorn
to it -
Define what kicks off the Flask app:
echo "web: gunicorn server.server:app" > Procfile
-
Deploy:
git push heroku master
> result: https://stripe-example-bob.herokuapp.com/ (if it takes a bit to load that's because I am using a free Heroku dyno).
You can customize the front-end by editing client/index.html
and client/css/global.css
.