Sha256: 37ffdf64b20f561b359e181e0b3abb4af787ee4814f7d91c8dfbb0a507bae63a
Contents?: true
Size: 607 Bytes
Versions: 10
Compression:
Stored size: 607 Bytes
Contents
# frozen_string_literal: true require 'bundler/setup' require 'tipi' require 'localhost/authority' ::Exception.__disable_sanitized_backtrace__ = true authority = Localhost::Authority.fetch opts = { reuse_addr: true, dont_linger: true, secure_context: authority.server_context } puts "pid: #{Process.pid}" puts 'Listening on port 1234...' Tipi.serve('0.0.0.0', 1234, opts) do |req| req.respond("Hello world!\n") # req.send_headers # req.send_chunk("Method: #{req.method}\n") # req.send_chunk("Path: #{req.path}\n") # req.send_chunk("Query: #{req.query.inspect}\n", done: true) end
Version data entries
10 entries across 10 versions & 1 rubygems