Elementary chat sends and receives messages from the other peers connected to the same topic and you who is online in real time.
- Install the packages running the following command on the terminal
npm i
. - Open two terminals.
- From the root of the project, run
npm start
on each of the two terminals. - Open two tabs on the browser:
- The first one opening
http://localhost:3000
- The second one opening
http://localhost:3001
- The first one opening
- You can chat.
- Save messages in the local storage only during the session of the user.
- After some time (15 minutes), delete the oldest online users.
- Waku's specifications https://rfc.vac.dev/spec/10/
- The code is an improvement of https://github.com/status-im/js-waku/blob/master/examples/relay-reactjs-chat/ (also in Waku Connect's docs). We improve the methods for sending different kind of data (e.g. messages, online users...) in the Waku protocol.