mirror of
https://github.com/logos-messaging/examples.waku.org.git
synced 2026-01-02 12:53:08 +00:00
Using Waku Relay WebRTC
Demonstrates:
- Waku Relay node with direct WebRTC connection
- Pure Javascript/HTML.
This example uses Waku Filter to listen to messages and Waku Light Push to send messages.
To test the example run npm install and then npm start.
The master branch's HEAD is deployed at https://examples.waku.org/relay-chat/.
Steps to run an example:
- Build and then run
go-wakunode with following command:./build/waku --ws true --relay true --circuit-relay true - Copy node's multiaddr (e.g
/ip4/192.168.0.101/tcp/60001/ws/p2p/16Uiu2HAm9w2xeDWFJm5eeGLZfJdaPtkNatQD1xrzK5EFWSeXdFvu) - In
relay-chatexample's folder runnpm installand thennpm start - Use
go-waku's multiaddr for Remote node multiaddr and press dial. Repeat in two more tabs. - In
tab2copy Local Peer Id and use as WebRTC Peer intab1and press dial. - In
tab1ortab2press Ensure WebRTC Relay connection - In
tab1press Drop non WebRTC connections - In
tab1enter Nickname and Message and send. - See the message in
tab3which was connected only togo-wakunode.