# File lib/rack/handler/webrick.rb, line 25 def self.run(app, options={}) environment = ENV['RACK_ENV'] || 'development' default_host = environment == 'development' ? 'localhost' : '0.0.0.0' options[:BindAddress] = options.delete(:Host) || default_host options[:Port] ||= 8080 options[:OutputBufferSize] = 5 @server = ::WEBrick::HTTPServer.new(options) @server.mount "/", Rack::Handler::WEBrick, app yield @server if block_given? @server.start end