lib/nitro/server.rb in nitro-0.23.0 vs lib/nitro/server.rb in nitro-0.24.0

- old
+ new

@@ -4,23 +4,20 @@ module Nitro class Server # The server listening address. - #-- - # 0.0.0.0 may be a better default? - #++ - setting :address, :default => '127.0.0.1', :doc => 'The server listening address' + setting :address, :default => '0.0.0.0', :doc => 'The server listening address' # The server listening port. setting :port, :default => 9999, :doc => 'The server listening port' # The map. - setting :map, :default => { '/' => SimpleController }, :doc => 'The server map' + setting :map, :default => { '/' => Controller }, :doc => 'The server map' # The public files root directory. setting :public_root, :default => 'public', :doc => 'The public files root directory' @@ -87,10 +84,11 @@ # Start the server. def start(options = {}) @map['/'] = options[:controller] if options[:controller] - @dispatcher = options[:dispatche] || Dispatcher.new(@map) + @dispatcher = options[:dispatcher] || Dispatcher.new(@map) + return self end def root=(controller) @map['/'] = controller end