Sha256: 660f5a275bb5fefb54f01960961ab526477653eea1b9b342ff412c2cb99cbba7

Contents?: true

Size: 596 Bytes

Versions: 4

Compression:

Stored size: 596 Bytes

Contents

# Configure "min" to be the minimum number of threads to use to answer
# requests and "max" the maximum.
threads 0,4

# Preload the application before starting the workers; this conflicts with
# phased restart feature. (off by default)
preload_app!

# This writes run/url.txt which allows us to watch and load the URL once puma has started.
get(:binds).tap do |binds|
	urls = binds.grep(/tcp:\/\/0.0.0.0:(\d+)/).collect do
		"http://localhost:#{$1}"
	end
	
	run_path = File.expand_path('../run', __dir__)
	
	FileUtils.mkdir_p run_path
	File.write(File.join(run_path, 'url.txt'), urls.first)
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
utopia-2.0.3 documentation/config/puma.rb
utopia-2.0.2 documentation/config/puma.rb
utopia-2.0.1 documentation/config/puma.rb
utopia-2.0.0 documentation/config/puma.rb