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
# File 'lib/rack/handler/thin.rb', line 8

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

.valid_optionsObject



16
17
18
19
20
21
# File 'lib/rack/handler/thin.rb', line 16

def self.valid_options
  {
    "Host=HOST" => "Hostname to listen on (default: localhost)",
    "Port=PORT" => "Port to listen on (default: 8080)",
  }
end