Class: Quiver::CLI::Server

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

Constant Summary collapse

DEFAULT_OPTIONS =
{
  config: 'config.ru',
  Port: '3000',
  Host: '127.0.0.1',
  AccessLog: []
}

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ Server

Returns a new instance of Server.



13
14
15
16
17
18
19
20
21
# File 'lib/quiver/cli/server.rb', line 13

def initialize(options = {})
  @quiver_opts = options
  @options = DEFAULT_OPTIONS.merge(rack_options)

  if reloading_code?
    require 'shotgun'
    @app  = Shotgun::Loader.new(@options[:config])
  end
end