Last active
October 13, 2016 19:38
-
-
Save fkchang/720a6a81511d078753d0cecf99efa990 to your computer and use it in GitHub Desktop.
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
2016-10-13T18:13:44.914081+00:00 d.a1c7b0ac-eebd-4bde-9ee9-292a704c87f3 app[web.6] Rendered vendor/bundle/ruby/1.9.1/bundler/gems/hedgeye-modules-0c8292b0e2f9/app/views/subscribe_buttons/_subscribe_js.html.haml (0.2ms) | |
require 'rubygems' | |
require 'roda' | |
class App < Roda | |
plugin :streaming | |
route do |r| | |
p r | |
stream do |out| | |
puts "streaming" | |
IO.popen('tail -f /var/log/syslog') do |io| | |
io.each { |s| | |
puts s | |
out << s | |
} | |
end | |
end | |
end | |
end | |
run App.freeze.app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment