js-waku/examples/cli-chat
Franck Royer 2306bb1708
Add breakdown of what examples demonstrate
Also move explanation to each readme.
2021-08-02 10:45:10 +10:00
..
src Examples: Content Topic moved out of options parameter 2021-07-28 12:03:51 +10:00
.eslintrc.json Move cli chat to examples folder 2021-05-05 10:53:40 +10:00
.gitignore Move cli chat to examples folder 2021-05-05 10:53:40 +10:00
.mocharc.json Move cli chat to examples folder 2021-05-05 10:53:40 +10:00
README.md Add breakdown of what examples demonstrate 2021-08-02 10:45:10 +10:00
package-lock.json Upgrade to libp2p 0.32.0 2021-07-27 14:31:06 +10:00
package.json Upgrade to libp2p 0.32.0 2021-07-27 14:31:06 +10:00
tsconfig.json Move cli chat to examples folder 2021-05-05 10:53:40 +10:00

README.md

CLI Chat App

Demonstrates:

  • Group chat
  • Node JS/TypeScript
  • Waku Relay
  • Waku Light Push
  • Waku Store

A node chat app is provided as a working example of the library. It implements Waku v2 Toy Chat protocol.

Find the code in the examples folder.

To run the chat app, first ensure you have Node.js v14 or above:

node --version

Then, install and run:

git clone https://github.com/status-im/js-waku/ ; cd js-waku
npm install   # Install dependencies for js-waku
npm run build # Build js-waku
cd examples/cli-chat
npm install # Install dependencies for the cli app
npm run start -- --autoDial

You can also specify an optional listenAddr parameter (.e.g --listenAddr /ip4/0.0.0.0/tcp/7777/ws). This is only useful if you want a remote node to dial to your chat app, it is not necessary in normal usage when you just connect to the fleet.