Class: Magpie::Server

Inherits:
Rack::Server
  • Object
show all
Defined in:
lib/magpie/server.rb

Defined Under Namespace

Classes: Options

Instance Method Summary collapse

Instance Method Details

#appObject



62
63
64
65
66
67
68
# File 'lib/magpie/server.rb', line 62

def app
  require 'apps'
  case self.options[:mode]
    when "snake"; SNAKE_APP
    when "bird"; BIRD_APP
  end
end

#default_optionsObject



70
71
72
73
74
75
76
77
78
79
80
81
# File 'lib/magpie/server.rb', line 70

def default_options
  {
    :environment => "development",
    :pid         => nil,
    :Port        => 9292,
    :Host        => "0.0.0.0",
    :AccessLog   => [],
    :yml         => "magpie.yml",
    :mode        => "snake",
    :log         => "magpie.log"
  }
end