Ruby Sinatra Starter
In this edition of Stripe Developer Office Hours, follow along as CJ Avilla walks through the fundamentals of working with Ruby Sinatra. For a getting started guide for Ruby on Rails checkout this other video: https://youtu.be/vULdSKCUhOs.
### Resources
Sinatra web framework http://sinatrarb.com/
curl command line tool https://curl.haxx.se/
dotenv Ruby gem https://github.com/bkeepers/dotenv
Stripe Webhooks Guide https://stripe.com/docs/webhooks/build
Stripe Event Types https://stripe.com/docs/api/events/types
Code: https://github.com/stripe-samples/developer-office-hours/tree/master/starter
### Table of contents
01:40 Agenda
02:39 Install starter with Stripe CLI
03:43 Create directory structure
03:54 Implement base client HTML
05:48 Install dependencies
08:32 Implement base server.rb
11:36 Add GET route for html file
13:20 Configure Sinatra
19:27 Add GET route for JSON to server
21:05 Add fetch to client to retrieve public key
24:30 Add POST route for JSON to server
28:10 Add fetch POST from client to server
36:33 Add webhook handler
### Presenter
CJ Avilla, Developer Advocate at Stripe - https://twitter.com/cjav_dev
### Support
If you have a question, please feel free to reach out to our support team on Discord at https://stripe.com/go/developer-chat.
### Updates
Sign up to stay updated with developer news: https://go.stripe.global/dev-digest
### Feedback
If you have any feedback about this or other episodes, let us know: https://forms.gle/VjNqzRhotM2snYo88.
#Stripe #Payments