diff options
-rw-r--r-- | lib/mauve/http_server.rb | 2 | ||||
-rw-r--r-- | lib/mauve/server.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/mauve/http_server.rb b/lib/mauve/http_server.rb index 583e6b5..9250b2e 100644 --- a/lib/mauve/http_server.rb +++ b/lib/mauve/http_server.rb @@ -187,7 +187,7 @@ module Mauve # # @return [String] def base_url - @base_url ||= "http://"+Server.instance.hostname + @base_url ||= "http://"+Server.instance.hostname+(self.port == "80" ? "" : ":#{self.port}") end # Stop the server diff --git a/lib/mauve/server.rb b/lib/mauve/server.rb index 0bbfdfb..52933ea 100644 --- a/lib/mauve/server.rb +++ b/lib/mauve/server.rb @@ -36,7 +36,7 @@ module Mauve # def initialize super - @hostname = "localhost" + @hostname = Socket.gethostname @database = "sqlite3::memory:" @started_at = Time.now |