# = Configuration # # Configuration parameters. # # code: # * George Moschovitis # # (c) 2004 Navel, all rights reserved. # $Id: config.rb 167 2004-11-23 14:03:10Z gmosx $ require 'glue/logger' require 'glue/hash' require 'nitro/version' require 'nitro/service' require 'nitro/server/shaders' # monitor scripts for changes #-- # gmosx, FIXME: replace this with reload_scripts ?? #++ $srv_monitor_scripts = true # The root (public) directory. $root_dir = "root" # the default file to view in a direcotry $index_filename = "index.sx" # seconds till the autologin cookie expires # TODO: move to filter. $srv_autologin_expires = 60*60*24*30 # session timeout (in seconds) $srv_session_timeout = 35*60 # session timeout for anonymous user (in seconds) $srv_anon_session_timeout = 30*60 # enable distributed state? $drb_state = false # use the default error page. $error_page_url = nil # default encoding for the app. $encoding = 'iso-8859-1' # Default template extesnion. $template_ext = 'xhtml' # Default xml template extension. $xml_template_ext = 'xml' # Default template. $index_template = 'index.xhtml' # default content type. $default_content_type = 'text/html' # The services map. # :index represents the '/' mount point $services = { :index => N::Service } # The service method map. $methods = G::SafeHash.new # The shader. The default shader is very simple, here # is a typical example of a production shader pipeline: # # # $shader = N::XSLTShader.new("#$root_dir/style.xsl", # N::RubyShader.new( # N::CompressShader.new # ) # ) # $shader = N::RubyShader.new if $DBG puts "\nRunning DEBUG configuration.\n\n" # Logger (redirect to STDERR) $log = Logger.new(STDERR); $log.level = Logger::DEBUG # If set to true disables xsl caching. Usefull when debugging xsls. $reload_xsl = true # If set to true disables script compilation. Usefull when debugging # statically included scripts. $reload_scripts = true # Standard server setup for debugging. $srv_address = $appsrv_address = "127.0.0.1" $srv_port = 8080 $appsrv_port = 8080 $srv_url = "http://#$srv_address:#$srv_port" else puts "\nRunning LIVE configuration.\n\n" $log = Logger.new("log/app.log", 10); $log.level = Logger::INFO # If set to true disables xsl caching. Usefull when debugging xsls. $reload_xsl = false # If set to true disables script compilation. Usefull when debugging # statically included scripts. $reload_scripts = false # Standard server setup for live server. You probably # want to override this. $srv_address = $appsrv_address = "127.0.0.1" $srv_port = 8080 $appsrv_port = 9090 $srv_url = "http://#$srv_address:#$srv_port" end