Class: WebSystem::FalconServerRack

Inherits:
ServerRack show all
Defined in:
lib/web_system/sub/rack/server_racks/falcon_server_rack.rb

Class Method Summary collapse

Methods inherited from Liza::Controller

color, inherited, on_connected

Methods inherited from Liza::Unit

const_missing, division, part, system, #system, test_class

Class Method Details

.call(rack_app) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/web_system/sub/rack/server_racks/falcon_server_rack.rb', line 3

def self.call rack_app
  rack_panel = WebBox[:rack]

  host = rack_panel.get :host
  port = rack_panel.get :port

  Signal.trap(:INT) do
    puts
    log "Exiting..."
    Lizarb.exit
  end

  # TODO: improve custom configurability for falcon

  require "rack/handler/falcon"
  handler = ::Rack::Handler::Falcon
  handler.run rack_app, Host: host, Port: port
end