Waku Web Chat POC
Go to file
Oskar Thoren 7c685e377e
Adjust topic
2020-09-21 13:12:06 +08:00
browser Adjust topic 2020-09-21 13:12:06 +08:00
nodejs Adjust topic 2020-09-21 13:12:06 +08:00
patches Add hacky patches for nim-waku interop 2020-09-21 12:57:00 +08:00
.gitignore Update README 2020-09-21 12:37:52 +08:00
README.md Connect with nim-waku node 2020-09-21 13:09:35 +08:00

README.md

Waku Web Chat Example

This is just a POC to showcase Waku usage from the browser.

Shamelessly based on https://github.com/libp2p/js-libp2p-examples/

Install

(cd browser && npm install)
(cd nodejs && npm install)

Run

Run bootstrap node:

cd nodejs/bootstrap
node index.js

Run nodejs node:

cd nodejs/src
node index.js

Run browser node:

cd nodejs
npm start 

You may start multiple browser or nodejs nodes but only one bootstrap node.

Patches

See patches folder for current hacks to get basic interop with nim-waku.

If there are problems applying them, comment out postinstall in package.json.

Interop with nim-waku

Go to https://github.com/status-im/nim-waku/ and build wakunode2.

Then run it:

./build/wakunode2 --ports-shift:0

Note the "Listening on" address in logs. E.g. /ip4/0.0.0.0/tcp/60000/p2p/16Uiu2HAmVKynP3QDpjxS2gujvy2Bp3BEKp8NzKmYspxDEVAGHftG.

Call nodejs node with it as argument:

node index.js /ip4/0.0.0.0/tcp/60000/p2p/16Uiu2HAmVKynP3QDpjxS2gujvy2Bp3BEKp8NzKmYspxDEVAGHftG