class Loadrunner::ServerBase
The base class for the sinatra server. Initialize what we can here, but since there are values that will become known only later, the prepare method is provided.
Public Class Methods
prepare(opts={})
click to toggle source
Since we cannot use any config values in the main body of the class, since they will be updated later, we need to set anything that relys on the config values just before running the server. The CommandLine
class and the test suite should both call `Server.prepare` before calling Server.run!
# File lib/loadrunner/server_base.rb, line 25 def self.prepare(opts={}) set :bind, opts[:bind] || '0.0.0.0' set :port, opts[:port] || '3000' end