Sha256: 30fcdc48c7f8d3ed601e4b1e20a8c19f3b13feebc76f1ffd2ec901aef094774b
Contents?: true
Size: 534 Bytes
Versions: 5
Compression:
Stored size: 534 Bytes
Contents
require 'rack/handler' require_relative '../../falcon' module Rack module Handler module Falcon def self.addresses_for(**options) host = options[:Host] || 'localhost' port = Integer(options[:Port] || 9292) return [ Async::IO::Endpoint.tcp(host, port) ] end def self.run(app, **options) addresses = addresses_for(**options) server = ::Falcon::Server.new(app, addresses) Async::Reactor.run do server.run end end end register :falcon, Falcon end end
Version data entries
5 entries across 5 versions & 1 rubygems