Pages

Sunday, December 22, 2013

How to Change Default Port i.e 3000 in Rails

Append these code lines in config/boot.rb:
require'rails/commands/server'
module Rails
  class Server
    alias:default_options_alias :default_options
    def default_options
      default_options_alias.merge!(:Port=>3333)
    end
  end
end
Now default port is 3333.
Set this number to any number with 4 digits that you like!!!

No comments:

Post a Comment