Sha256: 03babec0cc0deb5ec490911e06104cf7a93cd07416b6188485215c9e52dc87d3

Contents?: true

Size: 216 Bytes

Versions: 1

Compression:

Stored size: 216 Bytes

Contents

require 'sinatra'
require 'sinatra/async'
require 'yajl/json_gem'

class AsyncExample < Sinatra::Base
  register Sinatra::Async

  aget '*' do
    EM.add_timer(5) do
      body request.env.to_json
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
em-rack-mongrel2-0.1.0 example/async_sinatra/app.rb