- Create a new directory named
awesome-p2p-chat
. You can do that by simply opening terminal in a desired location and entering the following command:
mkdir awesome-p2p-chat
- Inside the directory, you need to initialize node. Node might ask you details like the package name, version, author, etc. as per your wish or simply keep the defaults. For initializing, enter into the newly created directory by using the command
cd awesome-p2p-chat
. Then run the following command for initialization:
npm init
- Install libp2p (version 0.27.6) implementation for node. For the same, run the command:
npm i [email protected]
Make sure you install v0.27.6, this tutorial is incompatible with the future versions at the moment.
Cool Tip: After you complete every module (other than 0), you would have something that you can run. For that, you can simply enter
node run index.js
from terminal of the root directory of the project. But that's for later. Let's Jump into the next module and start the magic!