Module: Rack::Handler::Pronghorn
- Defined in:
- lib/rack/handler/pronghorn.rb
Constant Summary collapse
- DEFAULT_OPTIONS =
{ :Host => '0.0.0.0', :Port => 8080, :Verbose => false }
Class Method Summary collapse
Class Method Details
.run(app, options = {}) {|server| ... } ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/rack/handler/pronghorn.rb', line 13 def self.run(app, = {}) = DEFAULT_OPTIONS.merge() if [:Verbose] app = Rack::CommonLogger.new(app, STDOUT) end server = ::Pronghorn::Server.new(app) yield server if block_given? server.start([:Host], [:Port]) end |
.valid_options ⇒ Object
24 25 26 27 28 29 |
# File 'lib/rack/handler/pronghorn.rb', line 24 def self. { "Host=HOST" => "Hostname to listen on (default: localhost)", "Port=PORT" => "Port to listen on (default: 8080)" } end |