Last active
March 10, 2017 13:13
-
-
Save progapandist/ab59b33ea6b977652f01c7976bca3ff2 to your computer and use it in GitHub Desktop.
This file contains 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 './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