module Middleman::PreviewServer
def start(opts={})
-
(void)
-
def start(opts={}) @options = opts @host = @options[:host] || '0.0.0.0' @port = @options[:port] || DEFAULT_PORT mount_instance(new_app) logger.info "== The Middleman is standing watch at http://#{host}:#{port}" logger.info "== Inspect your site configuration at http://#{host}:#{port}/__middleman/" @initialized ||= false return if @initialized @initialized = true register_signal_handlers # Save the last-used @options so it may be re-used when # reloading later on. ::Middleman::Profiling.report('server_start') loop do @webrick.start # $mm_shutdown is set by the signal handler if $mm_shutdown shutdown exit elsif $mm_reload $mm_reload = false reload end end end