Last active
February 6, 2018 07:03
-
-
Save et/6d9347e7c2455de397905a46065ea715 to your computer and use it in GitHub Desktop.
Set up initial handshake for Strava webhooks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'json' | |
require 'sinatra' | |
class App < Sinatra::Base | |
get '/event' do | |
hub_challenge = params['hub.challenge'] | |
content_type :json | |
{ 'hub.challenge' => hub_challenge }.to_json | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
require './app' | |
run App.new |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'sinatra' | |
group :development do | |
gem 'sinatra-contrib' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment