Class: Ramaze::Adapter::Mongrel

Inherits:
Base show all
Defined in:
lib/ramaze/adapter/mongrel.rb

Overview

Our Mongrel adapter acts as wrapper for the Rack::Handler::Mongrel.

Class Method Summary collapse

Methods inherited from Base

before, before_call, call, middleware_respond, respond, start, stop

Class Method Details

.run_server(host, port) ⇒ Object

start server on given host and port.



15
16
17
18
19
20
21
# File 'lib/ramaze/adapter/mongrel.rb', line 15

def run_server host, port
  server = ::Mongrel::HttpServer.new(host, port)
  server.register('/', ::Rack::Handler::Mongrel.new(self))
  thread = server.run
  thread[:adapter] = server
  thread
end