Class: Raw::MongrelAdapter
- Defined in:
- lib/raw/adapter/mongrel.rb
Overview
A Mongrel Adapter.
Mongrel is a fast HTTP library and server for Ruby that is intended for hosting Ruby web applications of any kind using plain HTTP rather than FastCGI or SCGI.
This is the preferred adapter for production Nitro applications.
Instance Method Summary collapse
Methods inherited from Adapter
Constructor Details
This class inherits a constructor from Raw::Adapter
Instance Method Details
#start(application) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 |
# File 'lib/raw/adapter/mongrel.rb', line 41 def start(application) super @mongrel = Mongrel::Configurator.new(:host => application.address) do listener(:port => application.port) do uri "/", :handler => MongrelHandler.new(application) trap("INT") { stop(application) } run end end @mongrel.join() end |
#stop ⇒ Object
55 56 57 58 |
# File 'lib/raw/adapter/mongrel.rb', line 55 def stop super @mongrel.stop() end |