Class: Rack::Handler::Thin

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

Overview

Rack Handler stricly to be able to use Thin through the rackup command. To do so, simply require ‘thin’ in your Rack config file and run like this

rackup --server thin

Class Method Summary collapse

Class Method Details

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

Yields:

  • (server)


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

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