code: function connectToPeer (event) {
    const multiaddr = $multiaddrInput.value
  
    if (!multiaddr) {
      return onError('No multiaddr was inserted.')
    }
  
    node.swarm.connect(multiaddr)
      .then(() => {
        onSuccess(`Successfully connected to peer.`)
        $multiaddrInput.value = ''
      })
      .catch(() => onError('An error occurred when connecting to the peer.'))
  }
docs: /* ===========================================================================
  Peers handling
  ===========================================================================