Class: Rack::Handler::Rainbows

Inherits:
Object
  • Object
show all
Defined in:
lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.5/examples/rainbows.rb

Class Method Summary collapse

Class Method Details

.run(app, **options) ⇒ Object



8
9
10
11
12
13
14
15
16
17
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/sinatra-3.0.5/examples/rainbows.rb', line 8

def self.run(app, **options)
  rainbows_options = {
    listeners: ["#{options[:Host]}:#{options[:Port]}"],
    worker_processes: 1,
    timeout: 30,
    config_file: ::File.expand_path('rainbows.conf', __dir__)
  }

  ::Rainbows::HttpServer.new(app, rainbows_options).start.join
end