aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails
diff options
context:
space:
mode:
authorDavid Cornu <davidjcornu@gmail.com>2015-08-17 18:02:35 +0000
committerDavid Cornu <davidjcornu@gmail.com>2015-08-18 08:43:11 -0400
commit306c14c41135dc8d308967821d0bb26cf4bb7ecd (patch)
tree886692f18eabd8d047b8586b864a76d51a6788d9 /railties/lib/rails
parent15fd2586a89f27031adc5fca8e03149b3c494fdb (diff)
downloadrails-306c14c41135dc8d308967821d0bb26cf4bb7ecd.tar.gz
rails-306c14c41135dc8d308967821d0bb26cf4bb7ecd.tar.bz2
rails-306c14c41135dc8d308967821d0bb26cf4bb7ecd.zip
Use the PORT environment variable for rails server
Diffstat (limited to 'railties/lib/rails')
-rw-r--r--railties/lib/rails/commands/server.rb2
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,