diff options
Diffstat (limited to 'config.ru')
-rw-r--r-- | config.ru | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -1,9 +1,18 @@ # Start home_timeline polling require_relative "service" -Service.setup - -# Start web app require_relative "app" +# HACK: The web app must be already started and accept "GET /webhook" when +# Service.setup is called +Thread.start { + sleep 1 + begin + Net::HTTP.get_response(URI(ENV["TWITTER_EVENT_STREAM_BASE_URL"])) + rescue + end + Service.setup +} + +# Start web app use Rack::Deflater run App |