Module: Iodine::Rack

Defined in:
lib/iodine/rack_utils.rb,
lib/rack/handler/iodine.rb,
ext/iodine/iodine_helpers.c

Overview

Iodine's Rack module provides a Rack complient interface (connecting Iodine to Rack) for an HTTP and Websocket Server.

Defined Under Namespace

Modules: Utils

Constant Summary collapse

IODINE_RACK_LOADED =
true

Class Method Summary collapse

Class Method Details

.run(app, options = {}) ⇒ Object

Runs a Rack app, as par the Rack handler requirements.



8
9
10
11
12
13
14
15
16
# File 'lib/rack/handler/iodine.rb', line 8

def self.run(app, options = {})
  # nested applications... is that a thing?
  Iodine.listen(service: :http, handler: app, port: options[:Port], address: options[:Host])

  # start Iodine
  Iodine.start

  true
end