Class: Pechkin::Command::RunServer
- Defined in:
- lib/pechkin/command/run_server.rb
Overview
Start pechkin HTTP server
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#configuration, #handler, #initialize, #puts, #warn
Constructor Details
This class inherits a constructor from Pechkin::Command::Base
Instance Method Details
#execute ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/pechkin/command/run_server.rb', line 11 def execute # Configure Puma server instead config.ru puma_config = Puma::Configuration.new do |user_config| user_config.bind "tcp://#{.bind_address}:#{.port}" user_config.threads .min_threads, .max_threads # Set max and min threads user_config.app AppBuilder.new.build(handler, ) end # Run Puma server with configuration launcher = Puma::Launcher.new(puma_config) launcher.run end |
#matches? ⇒ Boolean
7 8 9 |
# File 'lib/pechkin/command/run_server.rb', line 7 def matches? true # Always match end |