You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
453 B
19 lines
453 B
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)
|