class Syntropy::App
def initialize(machine, location, mount_path, opts = {})
def initialize(machine, location, mount_path, opts = {}) @machine = machine @location = File.expand_path(location) @mount_path = mount_path @opts = opts @module_loader = Syntropy::ModuleLoader.new(@location, @opts) @router = Syntropy::Router.new(@opts, @module_loader) @machine.spin do # we do startup stuff asynchronously, in order to first let TP2 do its # setup tasks @machine.sleep 0.15 @opts[:logger]&.call("Serving from #{File.expand_path(@location)}") @router.start_file_watcher if opts[:watch_files] end end