class Frails::DevServer

Public Instance Methods

host() click to toggle source
# File lib/frails/dev_server.rb, line 17
def host
  Frails.dev_server_host
end
host_with_port() click to toggle source

rubocop:enable Style/RescueStandardError

# File lib/frails/dev_server.rb, line 13
def host_with_port
  "#{host}:#{port}"
end
port() click to toggle source
# File lib/frails/dev_server.rb, line 21
def port
  Frails.dev_server_port
end
running?() click to toggle source

rubocop:disable Style/RescueStandardError

# File lib/frails/dev_server.rb, line 5
def running?
  Socket.tcp(host, port, connect_timeout: 0.01).close
  true
rescue
  false
end