Module: Ronin::Web

Defined in:
lib/ronin/web/server.rb,
lib/ronin/web/server/app.rb,
lib/ronin/web/server/base.rb,
lib/ronin/web/server/helpers.rb,
lib/ronin/web/server/request.rb,
lib/ronin/web/server/routing.rb,
lib/ronin/web/server/version.rb,
lib/ronin/web/server/response.rb,
lib/ronin/web/server/conditions.rb,
lib/ronin/web/server/reverse_proxy.rb,
lib/ronin/web/server/reverse_proxy/request.rb,
lib/ronin/web/server/reverse_proxy/response.rb

Overview

Namespace for ronin-web.

Defined Under Namespace

Modules: Server

Class Method Summary collapse

Class Method Details

.server(options = {}) {|server| ... } ⇒ Server::App

Returns the Ronin Web Server.

Examples:

Web.server do
  get '/hello' do
    'world'
  end
end

Parameters:

  • options (Hash) (defaults to: {})

    Additional options.

Yields:

  • (server)

    If a block is given, it will be passed the current web server.

Yield Parameters:

Returns:

See Also:



57
58
59
60
61
62
63
64
65
# File 'lib/ronin/web/server.rb', line 57

def self.server(options={},&block)
  unless @server
    @server = Server::App
    @server.run!(options.merge(background: true))
  end

  @server.class_eval(&block) if block
  return @server
end