I know that I can start a rails server on another port via -p
option. But I'd like to setup another port per application as long as I start webrick.
Any ideas?
Regards Felix
Append this to config/boot.rb
:
require 'rails/commands/server'
module DefaultOptions
def default_options
super.merge!(Port: 3001)
end
end
Rails::Server.send(:prepend, DefaultOptions)
Note: ruby >= 2.0 required.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With