Method: Waitress::Configure#initialize

Defined in:
lib/waitress/configure.rb

#initialize(root) ⇒ Configure

Returns a new instance of Configure.



20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/waitress/configure.rb', line 20

def initialize root
  @root = root
  @configurations = []
  generate_configs

  load_cfg

  @servers = @configurations.map do |conf|
    s = Waitress::HttpServer.new
    conf.hosts.each { |h| s << h }
    s.set_processes conf.processes
    s.ports *conf.ports
    s.internal_error conf.internal_error
    s
  end
  puts "Waitress Configuration Complete"
  puts "Servers Started on Ports: "
  @servers.each do |x|
    puts "\t#{x.ports.join ", "}"
  end
end