Sha256: ebb33f750097255ac8ed6019e049bf0296834f1b8053f056ed1af2dfd7ce3bde
Contents?: true
Size: 1.49 KB
Versions: 1
Compression:
Stored size: 1.49 KB
Contents
# = Configuration # # === Design: # # Use a separate file for configuration, makes the # main file more readable, and allows for reconfiguring # (reload) the webapp without restarting the server. # # FIXME: redesign this! # # code: gmosx # # (c) 2004 Navel, all rights reserved. # $Id: config.rb 89 2004-10-20 12:55:58Z gmosx $ require "n/std" require "n/properties" require "n/logger" require "n/config" $name = "Simple" $root_dir = "simple/root" # Main logger $log = Logger.new("simple/logs/app.log", 10); # Events logger $elog = Logger.new("simple/logs/events.log", "weekly"); require "n/db" require "n/app/cluster" require "n/config" require "simple/conf/requires" require "simple/conf/overrides" $srv_extension_map = { "sx" => ["text/html", # N::App::AutoLoginFilter.new( N::App::PageHandler.new # ) ], "si" => ["text/html", N::App::PageHandler.new ], "rx" => ["text/html", # N::App::AutoLoginFilter.new( N::App::CodeHandler.new # ) ] } # enable distributed sessions. $drb_state = true $drb_lm_server = "druby://:9000" $drb_sessions_cluster = "druby://:8001" module App # Config # module Config def initialize_sitemap end # # def initialize_shaders # $default_shader = N::NilShader.new $default_shader = N::Shader.new("simple", "#{$root_dir}/shader/shader.xsl") end def initialize_events $events = $event_manager = N::EventManager.new($elog) # Example event: $events.add_handler( "messages/add", "ranking", proc { |user| # nop } ) end end end # module
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
nitro-0.1.2 | examples/simple/conf/config.rb |