lib/trinidad/server.rb in trinidad-0.9.8 vs lib/trinidad/server.rb in trinidad-0.9.9
- old
+ new
@@ -12,11 +12,12 @@
:libs_dir => 'lib',
:classes_dir => 'classes',
:default_web_xml => 'config/web.xml',
:port => 3000,
:jruby_min_runtimes => 1,
- :jruby_max_runtimes => 5
+ :jruby_max_runtimes => 5,
+ :address => 'localhost'
}
end
def initialize(config = {})
load_config(config)
@@ -29,10 +30,11 @@
add_default_web_app!(@config)
end
def load_tomcat_server
@tomcat = Trinidad::Tomcat::Tomcat.new
- @tomcat.hostname = @config[:address] || 'localhost'
+ @tomcat.hostname = @config[:address]
+ @tomcat.server.address = @config[:address]
@tomcat.port = @config[:port].to_i
@tomcat.base_dir = Dir.pwd
@tomcat.host.app_base = Dir.pwd
enable_naming