use $PORT if set

This commit is contained in:
Konstantin Haase 2012-07-31 09:02:42 +02:00
parent 4d40a5e26c
commit d3de670965
1 changed files with 1 additions and 1 deletions

View File

@ -1629,7 +1629,7 @@ module Sinatra
set :running, false # is the built-in server running now?
set :server, %w[http webrick]
set :bind, '0.0.0.0'
set :port, 4567
set :port, Integer(ENV['PORT'] || 4567)
ruby_engine = defined?(RUBY_ENGINE) && RUBY_ENGINE