Class: Rack::Handler::Thin

Inherits:
Object
  • Object
show all
Defined in:
lib/rack/handler/thin.rb

Class Method Summary collapse

Class Method Details

.run(app, options = {}) {|server| ... } ⇒ Object

Yields:

  • (server)


8
9
10
11
12
13
14
15
# File 'lib/rack/handler/thin.rb', line 8

def self.run(app, options={})
  app = Rack::Chunked.new(Rack::ContentLength.new(app))
  server = ::Thin::Server.new(options[:Host] || '0.0.0.0',
                              options[:Port] || 8080,
                              app)
  yield server if block_given?
  server.start
end