require 'uri' #---------------------------------------------------------------------------- # Read Config from Environment #---------------------------------------------------------------------------- # This allows developers to use environment variables locally to set up # configuration instead of creating /etc/perforce/helix_web_services.conf. ENV['RACK_ENV'] ||= 'production' require 'hws_settings' if ENV.key?('WORKSPACE_DIR') HWSSettings.system_handle.WORKSPACE_DIR = ENV['WORKSPACE_DIR'] end #---------------------------------------------------------------------------- # Configure Sinatra #---------------------------------------------------------------------------- require 'helix_web_services' helix_web_services = HelixWebServices::Master.new #---------------------------------------------------------------------------- # Startup #---------------------------------------------------------------------------- # This is *only* the configuration for the Unicorn instance. Worker processes # and the web socket server will be managed *elsewhere*. run helix_web_services