Created
October 9, 2012 17:14
-
-
Save ehlertij/3860128 to your computer and use it in GitHub Desktop.
Rails 3 set default server and port
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/boot.rb | |
# Setting default port to 3010 | |
require 'rails/commands/server' | |
module Rails | |
class Server | |
alias :default_options_alias :default_options | |
def default_options | |
default_options_alias.merge!(:Port => 3010) | |
end | |
end | |
end | |
# Setting default server to Puma | |
module Rack | |
module Handler | |
def self.default(options={}) | |
Rack::Handler.get('Puma') | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!!