class Swee::Config::ServerConfig

Attributes

cmd[RW]
code_reload[RW]
env[RW]
handle_request_mode[RW]
listen[RW]
log_file[RW]
logger_level[RW]
max_connections[RW]
performance_monitoring[RW]
pid_file[RW]
restart_mode[RW]
run_background[RW]
touch_file[RW]

Public Instance Methods

default_config!(options) click to toggle source
# File lib/swee/config.rb, line 28
def default_config! options
  @listen = ( options[:listen] || 3000 )
  @handle_request_mode  ||= :event_loop
  @env = ( options[:env] || :development )
  @logger_level ||= :debug
  @code_reload ||= true
  @restart_mode ||= :pid
  @touch_file ||= File.expand_path("./tmp/restart.txt",ENV["app_path"])
  @pid_file ||= File.expand_path("./tmp/pid",ENV["app_path"])
  @log_file ||= [ File.expand_path("./logs/#{env.to_s}.log",ENV["app_path"]), 10, 10240000 ]
  @max_connections ||= 1024
  @performance_monitoring ||= false
  @run_background ||= false
  @cmd = options[:cmd]
end