Sha256: d8fa471f83bb82ca479336706e145f7fa0ec761f6a7758084d3e412107342c63
Contents?: true
Size: 644 Bytes
Versions: 11
Compression:
Stored size: 644 Bytes
Contents
# frozen_string_literal: true require 'bundler/setup' require 'tipi' require 'localhost/authority' app_path = ARGV.first || File.expand_path('./config.ru', __dir__) app = Polyphony::HTTP::Server::RackAdapter.load(app_path) authority = Localhost::Authority.fetch opts = { reuse_addr: true, dont_linger: true, secure_context: authority.server_context } server = Polyphony::HTTP::Server.listen('0.0.0.0', 1234, opts) puts 'Listening on port 1234' child_pids = [] 4.times do child_pids << Polyphony.fork do puts "forked pid: #{Process.pid}" server.each(&app) end end child_pids.each { |pid| EV::Child.new(pid).await }
Version data entries
11 entries across 11 versions & 1 rubygems