Sha256: ba5f1048e97a14023da621a89b02ac4cc593d8d8bb9931f47d81e5c624220443

Contents?: true

Size: 442 Bytes

Versions: 3

Compression:

Stored size: 442 Bytes

Contents

#!/usr/bin/env ruby
PORT = ENV["KAFKR_PORT"] || 4000

begin
  require "kafkr"
rescue LoadError => e
  puts "Failed to load Kafkr: #{e.message}"
  exit(1)
end

begin
  server = Kafkr::Log.new(PORT.to_i)
  puts "Log started on port #{PORT}!"
  server.start
rescue => e
  puts "An error occurred: #{e.message}"
  exit(1)
rescue Interrupt
  puts "\nLog server shutting down gracefully..."
  server.stop if server.respond_to?(:stop)
  exit(0)
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kafkr-0.5.7 exe/kafkr
kafkr-0.5.6 exe/kafkr
kafkr-0.5.5 exe/kafkr