This is an implementation of the wonderful Kademlia DHT (Distributed HashTable) protocol, using peerjs as the network layer.
For the peer.js Server you need to use a modified version, that has some DHT specific features: peerjs-server fork
git clone https://github.com/timsuchanek/peerjs-server.git
cd peerjs-server
npm install
bin/peerjs --port 9000 --key peerjs
git clone git clone https://github.com/timsuchanek/webrtc-kademlia.git
cd webrtc-kademlia
npm install
npm start
Point 2 Browser Tabs to http://localhost:8000
and enjoy the demo.
(We need two, because they need to connect to have a working demo)
If you want to change something in the code, run webpack in the src/browser
folder to compile it with webpack:
webpack main.js build.js --watch -d
MIT