<commit_before>require_relative '../lib/postal/config'
threads_count = Postal.config.web_server&.max_threads&.to_i || 5
threads         threads_count, threads_count
bind_address  = Postal.config.web_server&.bind_address || '127.0.0.1'
bind_port     = Postal.config.web_server&.port&.to_i || 5000
bind            "tcp://#{bind_address}:#{bind_port}"
environment     Postal.config.rails&.environment || 'development'
prune_bundler
quiet false
unless ENV['LOG_TO_STDOUT']
  stdout_redirect Postal.log_root.join('puma.log'), Postal.log_root.join('puma.log'), true
end

if ENV['APP_ROOT']
  directory ENV['APP_ROOT']
end<commit_msg>support for environment variable for puma PORT<commit_after>require_relative '../lib/postal/config'
threads_count = Postal.config.web_server&.max_threads&.to_i || 5
threads         threads_count, threads_count
bind_address  = Postal.config.web_server&.bind_address || '127.0.0.1'
bind_port     = ENV['PORT'] || Postal.config.web_server&.port&.to_i || 5000
bind            "tcp://#{bind_address}:#{bind_port}"
environment     Postal.config.rails&.environment || 'development'
prune_bundler
quiet false
unless ENV['LOG_TO_STDOUT']
  stdout_redirect Postal.log_root.join('puma.log'), Postal.log_root.join('puma.log'), true
end

if ENV['APP_ROOT']
  directory ENV['APP_ROOT']
end
{'fraction_non_alphanumeric': 0.141321044546851, 'fraction_numerical': 0.016897081413210446, 'mean_word_length': 5.06046511627907, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6366089', 'n_tokens_mistral': 476, 'n_tokens_neox': 443, 'n_words': 74}