module Puma::RackHandler

def run(app, **options)

def run(app, **options)
  conf = self.config(app, options)
  log_writer = options.delete(:Silent) ? ::Puma::LogWriter.strings : ::Puma::LogWriter.stdio
  launcher = ::Puma::Launcher.new(conf, :log_writer => log_writer, events: @events)
  yield launcher if block_given?
  begin
    launcher.run
  rescue Interrupt
    puts "* Gracefully stopping, waiting for requests to finish"
    launcher.stop
    puts "* Goodbye!"
  end
end