Method: Mainline::Server#start

Defined in:
lib/mainline/server.rb

#startObject



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

def start
  options = {:Port => @config.port, :Host => "0.0.0.0"}
  
  @server = Rack::Handler::WEBrick
  require RAILS_ROOT + "/config/environment"
  inner_app = ActionController::Dispatcher.new
  inner_app.send(:build_middleware_stack)
  app = Rack::Builder.new { run inner_app }.to_app
  @server.run(app, options.merge(:AccessLog => []))
end