Skip to content
This repository has been archived by the owner. It is now read-only.
master
Switch branches/tags

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Chat Example

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.

js-libp2p Version

This example has been updated for js-libp2p 0.31.0.

For previous versions of js-libp2p, please see their respective branch:

Resources

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.

Setup

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.

  1. Run the bootstrap node
  2. 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.
  3. 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.
  4. If you are doing the Browser example, do the setup instructions in that README