diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-08-24 12:11:36 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-08-24 12:11:36 -0300 |
commit | 1c1ad2b74600579e255bcb34e9926de2a76ac61a (patch) | |
tree | c9884dd7adcbe46c031771d7d43e1e6317232a68 /railties/lib | |
parent | 35161a7f5397f564d895525eddead142aca7fbe3 (diff) | |
parent | 306c14c41135dc8d308967821d0bb26cf4bb7ecd (diff) | |
download | rails-1c1ad2b74600579e255bcb34e9926de2a76ac61a.tar.gz rails-1c1ad2b74600579e255bcb34e9926de2a76ac61a.tar.bz2 rails-1c1ad2b74600579e255bcb34e9926de2a76ac61a.zip |
Merge pull request #21267 from davidcornu/rails-server-port-env-var
Use the PORT environment variable for rails server
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/commands/server.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/lib/rails/commands/server.rb b/railties/lib/rails/commands/server.rb index c8fb58ab05..d3ea441f8e 100644 --- a/railties/lib/rails/commands/server.rb +++ b/railties/lib/rails/commands/server.rb @@ -86,7 +86,7 @@ module Rails def default_options super.merge({ - Port: 3000, + Port: ENV.fetch('PORT', 3000).to_i, DoNotReverseLookup: true, environment: (ENV['RAILS_ENV'] || ENV['RACK_ENV'] || "development").dup, daemonize: false, |