This example will guide you through creating a basic Chat application with libp2p. The example provides you the opportunity to work through Node.js or Browser code.
Both examples will benefit from you using the provided Bootstrap node. You can view the README there.
You can follow along with the IPFS Camp 2019 Workshop slide deck if you'd like more information. Make sure to view the speaker notes if the slides aren't clear.
Important: If you are running through this example by yourself you will need to run the Bootstrap node. If you are doing this with others on a local network (such as IPFS Camp), only 1 person should run the bootstrap server as its Peer ID is static.
- Run the bootstrap node
- From ./nodejs, run
npm clean-install
to install the node modules. Note: Installing the modules here, will also install everything you need for the Node.js example. - From ./nodejs/bootstrap, run
node index.js
to run the Bootstrap server. Note: You can also chat from the Bootstrap node terminal, once you have reached that point in the Example. - If you are doing the Browser example, do the setup instructions in that README