Module: Bridgetown::Rack::Environment::Puma

Defined in:
bridgetown-core/lib/bridgetown-core/rack/environments/puma.rb

Instance Method Summary collapse

Instance Method Details

#bindObject



11
12
13
# File 'bridgetown-core/lib/bridgetown-core/rack/environments/puma.rb', line 11

def bind
  @bind || "tcp://0.0.0.0"
end

#commandObject



23
24
25
# File 'bridgetown-core/lib/bridgetown-core/rack/environments/puma.rb', line 23

def command
  ["puma", "-b", bind, "-p", port.to_s, *options, rack_config]
end

#optionsObject



19
20
21
# File 'bridgetown-core/lib/bridgetown-core/rack/environments/puma.rb', line 19

def options
  []
end

#portObject



7
8
9
# File 'bridgetown-core/lib/bridgetown-core/rack/environments/puma.rb', line 7

def port
  @port || ENV["BRIDGETOWN_PORT"] || "4000"
end

#rack_configObject



15
16
17
# File 'bridgetown-core/lib/bridgetown-core/rack/environments/puma.rb', line 15

def rack_config
  "config.ru"
end