class ViteRuby
def dev_server_running?
Public: Returns true if the Vite development server is currently running.
def dev_server_running? return false unless run_proxy? return @running if defined?(@running) && Time.now - @running_checked_at < 1 begin Socket.tcp(config.host, config.port, connect_timeout: config.dev_server_connect_timeout).close @running = true rescue StandardError @running = false ensure @running_checked_at = Time.now end end