2020-09-21 13:09:35 +08:00
2020-09-21 13:09:35 +08:00
2020-09-21 12:37:52 +08:00
2020-09-21 13:09:35 +08:00

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
Description
No description provided
Readme 312 KiB
Languages
JavaScript 96.5%
CSS 2.8%
HTML 0.7%