class Rackup::Server
def initialize(options = nil)
* :profile_mode
location for CPU/Memory (StackProf) profile output (defaults to a tempfile)
* :profile_file
location for ObjectSpace.dump_all to write the output to
* :heapfile
Additional options for profiling app initialization include:
require the given libraries
* :require
add given paths to $LOAD_PATH
* :include
turn on warnings ($-w = true)
* :warn
turn on debug output ($DEBUG = true)
* :debug
webrick access log options (or supporting Rackup::Handler)
* :AccessLog
the port to bind to (used by supporting Rackup::Handler)
* :Port
the host address to bind to (used by supporting Rackup::Handler)
* :Host
path to write a pid file after daemonize
* :pid
if :noclose, the server will not close STDOUT/STDERR
if truthy, the server will daemonize itself (fork, detach, etc)
* :daemonize
choose a specific Rackup::Handler, e.g. cgi, fcgi, webrick
* :server
note: when the server is a cgi server, CommonLogger is not included.
- none: no extra middleware
- deployment: CommonLogger
- development: CommonLogger, ShowExceptions, and Lint
your application. Default options available are:
this selects the middleware that will be wrapped around
* :environment
a rackup configuration file path to load (.ru)
* :config
a string to evaluate a Rack::Builder from
* :builder
a rack application to run (overrides :config and :builder)
* :app
Options may include:
def initialize(options = nil) @ignore_options = [] if options @use_default_options = false @options = options @app = options[:app] if options[:app] else @use_default_options = true @options = parse_options(ARGV) end end