Class: Merb::Rack::EventedMongrel
- Defined in:
- lib/merb-core/rack/adapter/evented_mongrel.rb
Class Method Summary collapse
-
.start(opts = {}) ⇒ Object
Starts Mongrel as evented.
Class Method Details
.start(opts = {}) ⇒ Object
Starts Mongrel as evented.
Parameters
- opts<Hash>
-
Options for Mongrel (see below).
Options (opts)
- :host<String>
-
The hostname that Mongrel should serve.
- :port<Fixnum>
-
The port Mongrel should bind to.
- :app<String>>
-
The application name.
16 17 18 19 20 21 22 23 |
# File 'lib/merb-core/rack/adapter/evented_mongrel.rb', line 16 def self.start(opts={}) Merb.logger.warn!("Using EventedMongrel adapter") Merb::Dispatcher.use_mutex = false server = ::Mongrel::HttpServer.new(opts[:host], opts[:port].to_i) Merb::Server.change_privilege server.register('/', ::Merb::Rack::Handler::Mongrel.new(opts[:app])) server.run.join end |