From 1d03b70fcbc04795033c3fc323e851eb3435ef2f Mon Sep 17 00:00:00 2001 From: "fryorcraken.eth" Date: Tue, 13 Sep 2022 22:46:34 +1000 Subject: [PATCH] feat: add light push + filter JavaScript example --- ci/Jenkinsfile | 1 + light-js/README.md | 13 +++++ light-js/index.html | 126 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 140 insertions(+) create mode 100644 light-js/README.md create mode 100644 light-js/index.html diff --git a/ci/Jenkinsfile b/ci/Jenkinsfile index 50d43da..09eb606 100644 --- a/ci/Jenkinsfile +++ b/ci/Jenkinsfile @@ -40,6 +40,7 @@ pipeline { parallel { stage('relay-js') { steps { script { copyExample() } } } stage('store-js') { steps { script { copyExample() } } } + stage('light-js') { steps { script { copyExample() } } } } } diff --git a/light-js/README.md b/light-js/README.md new file mode 100644 index 0000000..ca9798f --- /dev/null +++ b/light-js/README.md @@ -0,0 +1,13 @@ +# Using Waku Light Push and Filter in JavaScript + +**Demonstrates**: + +- Waku Light node: Waku Filter + Waku Light Push +- Pure Javascript/HTML. +- Use minified bundle of js from unpkg.com, no import, no package manager. + +This example uses Waku Filter to listen to messages and Waku Light Push to send messages. + +To test the example, simply download the `index.html` file from this folder and open it in a browser. + +The `master` branch's HEAD is deployed at https://js.waku.org/light-js/. diff --git a/light-js/index.html b/light-js/index.html new file mode 100644 index 0000000..56bd698 --- /dev/null +++ b/light-js/index.html @@ -0,0 +1,126 @@ + + + + + + + JS-Waku light node example + + + + +

Status

+
+ +

Local Peer Id

+
+ +

Remote Peer Id

+
+ + + +
+ + +
+ + +
+
+ + + + +