-
-
Save bmizerany/11155 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
# A Sinatra app that does the same thing | |
require 'rubygems' | |
require 'sinatra' | |
set :env, :production | |
get '/' do | |
"x" * (params[:size].to_i * 1024) | |
end |
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
$:.unshift( "waves/lib" ) | |
require 'rubygems' | |
require 'waves' | |
module BoogieBoard | |
include Waves::Foundations::Simple | |
module Configurations | |
class Production < Waves::Configurations::Default | |
host '0.0.0.0' ; port 3000 ; debug false ; synchronize? false | |
handler ::Rack::Handler::Mongrel, :Host => host, :Port => port | |
application { run ::Waves::Dispatchers::Default.new } | |
end | |
module Mapping | |
extend Waves::Mapping | |
on( :get => [] ) { data = "x" * ( query.size.to_i * 1024 ) } | |
end | |
end | |
end | |
Waves << BoogieBoard |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment