1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
puma--puma/test/config/app.rb
schneems 3f2fb13fcd Ignore multiple port declarations
Right now if you specify a port via `-p $PORT` and via a `config/puma.rb` then puma will incorrectly try to bind to the same port twice and will fail.

This PR calls `uniq!` on the array to remove duplicate ports from the `binds` array.
2015-02-17 08:58:19 -06:00

9 lines
145 B
Ruby

port ENV['PORT'] if ENV['PORT']
app do |env|
[200, {}, ["embedded app"]]
end
lowlevel_error_handler do |err|
[200, {}, ["error page"]]
end