Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. 'use strict'
  2. /* eslint-disable no-console */
  3. const PeerId = require('peer-id')
  4. const PeerInfo = require('peer-info')
  5. const Node = require('./libp2p_bundle')
  6. PeerId.createFromJSON(require('./ids/moonId'), (err, peerId) => {
  7. if (err) {
  8. throw err
  9. }
  10. const peerInfo = new PeerInfo(peerId)
  11. peerInfo.multiaddrs.add('/ip4/127.0.0.1/tcp/10333')
  12. const nodeListener = new Node({ peerInfo })
  13. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement