Module: Rackup::Handler::Cougar
- Defined in:
- lib/rackup/handler/cougar.rb
Class Method Summary collapse
Class Method Details
.run(app, **options) {|server| ... } ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/rackup/handler/cougar.rb', line 8 def self.run(app, **) host = [:Host] || "localhost" port = Integer([:Port] || 9292) server = ::Cougar::Server.new(app, host: host, port: port) yield server if block_given? server.run end |
.valid_options ⇒ Object
17 18 19 20 21 22 |
# File 'lib/rackup/handler/cougar.rb', line 17 def self. { "Host=HOST" => "Hostname to listen on (default: localhost)", "Port=PORT" => "Port to listen on (default: 9292)" } end |