Sha256: 84ba5cd59591c93026a58380d9aa7a756d52e76099d117eb26dbe1501351bc73

Contents?: true

Size: 216 Bytes

Versions: 4

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(1) do
      body request.env.to_json
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
em-rack-mongrel2-0.2.3 example/async_sinatra/app.rb
em-rack-mongrel2-0.2.2 example/async_sinatra/app.rb
em-rack-mongrel2-0.2.1 example/async_sinatra/app.rb
em-rack-mongrel2-0.2.0 example/async_sinatra/app.rb