Check out example codes for "rails server set default port and ip". It will help you in understanding the concepts better.

Code Example 1

require 'rails/commands/server'
module Rails
  class Server
    def default_options
      super.merge(Host:  '0.0.0.0', Port: 3000)
    end
  end
end

Learn ReactJs, React Native from akashmittal.com