Sha256: 03d4fbb61a3cee7ea789245c6f8b5e0d1527ded18c263e31ebcf196251271f83
Contents?: true
Size: 611 Bytes
Versions: 4
Compression:
Stored size: 611 Bytes
Contents
#!/usr/bin/env ruby # frozen_string_literal: true require "stats_lite" require "rack/handler/puma" require "filewatcher" print StatsLite::Log.yellow("\nStarting stats-lite\n") config = "./config.rb" load_config = -> do if File.exist?(config) print StatsLite::Log.red "\nFound config.rb\n" load config end end load_config.call Thread.new do Filewatcher.new(StatsLite.configure.watch).watch do |filename, event| load_config.call end end app = Rack::Builder.new do use StatsLite::App run lambda { |env| [404, {}, []] } end Rack::Handler::Puma.run(app, Port: StatsLite.configure.port)
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
stats_lite-0.5.4 | exe/stats-lite |
stats_lite-0.5.3 | exe/stats-lite |
stats_lite-0.5.2 | exe/stats-lite |
stats_lite-0.5.1 | exe/stats-lite |