Method: Rack::Server#initialize
- Defined in:
- lib/rack/server.rb
#initialize(options = nil) ⇒ Server
Options may include:
-
:app
a rack application to run (overrides :config) -
:config
a rackup configuration file path to load (.ru) -
:environment
this selects the middleware that will be wrapped around your application. Default available are: - development: CommonLogger, ShowExceptions, and Lint - deployment: CommonLogger - none: no extra middleware note: when the server is a cgi server, CommonLogger is not included. -
:server
choose a specific Rack::Handler, e.g. cgi, fcgi, webrick -
:daemonize
if true, the server will daemonize itself (fork, detach, etc) -
:pid
path to write a pid file after daemonize -
:Host
the host address to bind to (used by supporting Rack::Handler) -
:Port
the port to bind to (used by supporting Rack::Handler) -
:AccessLog
webrick acess log (or supporting Rack::Handler) -
:debug
turn on debug output ($DEBUG = true) -
:warn
turn on warnings ($-w = true) -
:include
add given paths to $LOAD_PATH -
:require
require the given libraries
144 145 146 147 |
# File 'lib/rack/server.rb', line 144 def initialize( = nil) = @app = [:app] if && [:app] end |