Sha256: f86d449798dd4348797ed4be03c87ef5ab4eb42aa72942f20056791e116e389f

Contents?: true

Size: 446 Bytes

Versions: 1

Compression:

Stored size: 446 Bytes

Contents

#!/usr/bin/env ruby

require 'puma/cli'
require 'simple_pvr'

port = ENV['port'] || 4567
key = ENV['key']
cert = ENV['cert']
use_ssl = key && cert

if use_ssl
  bind_url = "ssl://0.0.0.0:#{port}?key=#{key}&cert=#{cert}"
else
  puts 'Consider setting up SSL by specifying key and cert. Please consult the documentation.'
  bind_url = "tcp://0.0.0.0:#{port}"
end

Puma::CLI.new([SimplePvr::PvrInitializer.rackup_file_path, '--bind', bind_url]).run

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simple_pvr-1.1.0 bin/pvr_server