Skip to content

Instantly share code, notes, and snippets.

@progapandist
Last active March 10, 2017 13:13
Show Gist options
  • Save progapandist/ab59b33ea6b977652f01c7976bca3ff2 to your computer and use it in GitHub Desktop.
Save progapandist/ab59b33ea6b977652f01c7976bca3ff2 to your computer and use it in GitHub Desktop.
require './app'
require_relative 'bot' # you can comment this line out until you create a bot.rb file later in the tutorial
# you may need this lines in order to test your server before you create bot.rb later
require ‘facebook/messenger’
include Facebook::Messenger
# run both Sinatra and facebook-messenger on /webhook
map("/webhook") do
run Sinatra::Application
run Facebook::Messenger::Server
end
# run regular sinatra for other paths (in case you ever need it)
run Sinatra::Application
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment