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.
14 lines
357 B
14 lines
357 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], logger: logger, reload: dev, autoload: dev){App}
|
|
require_relative "lib/models"
|
|
Unreloader.require("lib/app.rb"){'App'}
|
|
run(dev ? Unreloader : App.freeze.app)
|