This module has been deprecated in favour of:
- Consolidating examples for libp2p on js-libp2p
- Avoid duplication of code
- Reducing overhead in maintainece. Now the bundles live in js-ipfs itself, see - https://github.com/ipfs/js-ipfs/tree/master/src/core/runtime
- Now all of the tests live in https://github.com/libp2p/js-libp2p/tree/master/test
libp2p bundle (module) used in js-ipfs when run in Node.js. If you are looking for the browser version, see libp2p-ipfs-browser
This libp2p build has support for:
- TCP and WebSockets
- SPDY and mplex stream multiplexing
- secio encrypted channels
- Identify STUN protocol
> npm i libp2p-ipfs-nodejs
const Node = require('libp2p-ipfs-nodejs')
const PeerInfo = require('peer-info')
const Node = require('libp2p-ipfs-nodejs')
PeerInfo.create((err, pi) => {
if (err) {
throw err // handle the err
}
pi.multiaddr.add('/ip4/0.0.0.0/tcp/0')
const node = new Node(pi)
node.start((err) => {
if (err) {
throw err // handle the err
}
console.log('Node is ready o/')
})
})
API docs can be found at https://github.com/libp2p/js-libp2p#usage
Feel free to join in. All welcome. Open an issue!
This repository falls under the IPFS Code of Conduct.