Class: Jubilee::Server

Inherits:
PlatformManager
  • Object
show all
Defined in:
lib/jubilee/server.rb

Instance Method Summary collapse

Constructor Details

#initialize(app, opts = {}) ⇒ Server

Returns a new instance of Server.



3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/jubilee/server.rb', line 3

def initialize(app, opts = {})
  options = {Host: "0.0.0.0", Port: 8080, ssl: false, instances: 1, environment: "development", quiet: true}.merge(opts)
  if (options[:ssl]) && options[:ssl_keystore].nil?
      raise ArgumentError, "Please provide a keystore for ssl"
  end
  # Rackup passes a string value
  options[:Port] = options[:Port].to_i
  # back compatible
  if app
    options[:rackapp] = Application.new(app)
  end
  super(options)
end

Instance Method Details

#startObject



17
18
# File 'lib/jubilee/server.rb', line 17

def start
end