dev = ENV["RACK_ENV"] == "development" if dev require "logger" logger = Logger.new($stdout) end require "rack/unreloader" Unreloader = Rack::Unreloader.new( subclasses: %w[Roda Sequel::Model Phlex::HTML], logger: logger, reload: dev, autoload: dev, ) { RankKing::App } # require_relative("lib/models") Unreloader.require("lib/views.rb") Unreloader.require("lib/app.rb") { "RankKing::App" } run(dev ? Unreloader : RankKing::App.freeze.app)