Module: Rack::Handler::Itsi

Defined in:
lib/itsi/server/rack/handler/itsi.rb

Class Method Summary collapse

Class Method Details

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



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

def self.run(app, options = {})
  host = options.fetch(:host, "127.0.0.1")
  port = options.fetch(:Port, 3001)
  ::Itsi::Server.start(
    {
      binds: ["http://#{host}:#{port}"]
    }
  ) do
    run app
  end
end