method

host

host()
private

No documentation available.

# File railties/lib/rails/commands/server/server_command.rb, line 218
        def host
          if options[:binding]
            options[:binding]
          else
            default_host = environment == "development" ? "localhost" : "0.0.0.0"

            if ENV["HOST"] && !ENV["BINDING"]
              ActiveSupport::Deprecation.warn(                Using the `HOST` environment variable to specify the IP is deprecated and will be removed in Rails 6.1.                Please use `BINDING` environment variable instead..squish)

              return ENV["HOST"]
            end

            ENV.fetch("BINDING", default_host)
          end
        end