Sha256: 0dd025e8ba15891bfd48752a6a1c8999848c2f3fa919a85a9de0c0ce3e1550aa
Contents?: true
Size: 464 Bytes
Versions: 13
Compression:
Stored size: 464 Bytes
Contents
# frozen_string_literal: true require 'bundler/setup' require 'tipi' require 'fileutils' opts = { reuse_addr: true, dont_linger: true } puts "pid: #{Process.pid}" puts 'Listening on port 4411...' root_path = FileUtils.pwd trap('INT') { exit! } Tipi.serve('0.0.0.0', 4411, opts) do |req| path = File.join(root_path, req.path) if File.file?(path) req.serve_file(path) else req.respond(nil, ':status' => Qeweney::Status::NOT_FOUND) end end
Version data entries
13 entries across 13 versions & 1 rubygems