rainbows.git  about / heads / tags
Unicorn for sleepy apps and slow clients
blob ef76504ce2b66eeb714243f0e842146bc5f6e185 244 bytes (raw)
$ git show v0.3.0:t/async-response.ru	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
 
use Rack::Chunked
use Rainbows::DevFdResponse
run lambda { |env|
  io = IO.popen('for i in 0 1 2 3 4 5 6 7 8 9; do date; sleep 1; done', 'rb')
  io.sync = true
  [
    200,
    {
      'Content-Type' => 'text/plain',
    },
    io
  ].freeze
}

git clone https://yhbt.net/rainbows.git