Class: Mack::SimpleServer

Inherits:
Object
  • Object
show all
Defined in:
lib/initialization/server/simple_server.rb

Overview

Even though it’s called, SimpleServer, this might be the only server you need to run a Mack application.

$ ruby script/server

This SimpleServer does not use Thin. But does work with anything that Rack has a handler for.

Class Method Summary collapse

Class Method Details

.run(options) ⇒ Object



12
13
14
15
16
# File 'lib/initialization/server/simple_server.rb', line 12

def run(options)
  r = "Rack::Handler::#{options.handler.camelcase}"
  puts "Starting app using: #{r} in #{options.environment} mode on port: #{options.port}"
  eval(r).run(Mack::Utils::Server.build_app, :Port => options.port)
end