function getHttpPort (addrs) {
  let httpUrl = null

  if (Array.isArray(addrs)) {
    httpUrl = addrs.find(v => v.includes('127.0.0.1'))
  } else {
    httpUrl = addrs
  }

  const gw = parseMultiaddr(httpUrl)
  return gw.nodeAddress().port
}
Get local HTTP port.

@param {array|string} addrs
@returns {number} the port