Class: Pechkin::Command::RunServer

Inherits:
Base
  • Object
show all
Defined in:
lib/pechkin/command/run_server.rb

Overview

Start pechkin HTTP server

Instance Attribute Summary

Attributes inherited from Base

#options

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

#executeObject



9
10
11
12
13
14
# File 'lib/pechkin/command/run_server.rb', line 9

def execute
  Rack::Server.start(app: AppBuilder.new.build(handler, options),
                     Host: options.bind_address,
                     Port: options.port,
                     pid: options.pid_file)
end

#matches?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'lib/pechkin/command/run_server.rb', line 5

def matches?
  true # Always match
end