mirror of
https://github.com/logos-messaging/logos-messaging-js.git
synced 2026-05-16 17:49:27 +00:00
fix(examples): update using new bundles
This commit is contained in:
parent
d560f8ce0e
commit
5f1ac595b6
@ -27,10 +27,12 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
import {
|
||||||
createWaku,
|
|
||||||
waitForRemotePeer,
|
waitForRemotePeer,
|
||||||
WakuMessage
|
WakuMessage
|
||||||
} from '../../dist/bundle.js';
|
} from '../../bundle/index.js';
|
||||||
|
import {
|
||||||
|
createWaku,
|
||||||
|
} from '../../bundle/lib/create_waku.js';
|
||||||
|
|
||||||
const statusDiv = document.getElementById('status');
|
const statusDiv = document.getElementById('status');
|
||||||
const messagesDiv = document.getElementById('messages');
|
const messagesDiv = document.getElementById('messages');
|
||||||
@ -56,7 +58,7 @@
|
|||||||
// We are currently working on migrating this method to DNS Discovery.
|
// We are currently working on migrating this method to DNS Discovery.
|
||||||
//
|
//
|
||||||
// https://js-waku.wakuconnect.dev/classes/waku.Waku.html#create
|
// https://js-waku.wakuconnect.dev/classes/waku.Waku.html#create
|
||||||
const waku = await createWaku({ bootstrap: { default: true } });
|
const waku = await createWaku({ defaultBootstrap: true });
|
||||||
await waku.start();
|
await waku.start();
|
||||||
|
|
||||||
// Had a hook to process all incoming messages on a specified content topic.
|
// Had a hook to process all incoming messages on a specified content topic.
|
||||||
|
|||||||
@ -14,10 +14,12 @@
|
|||||||
|
|
||||||
<script type='module'>
|
<script type='module'>
|
||||||
import {
|
import {
|
||||||
createWaku,
|
|
||||||
waitForRemotePeer,
|
waitForRemotePeer,
|
||||||
Protocols
|
Protocols
|
||||||
} from '../../dist/bundle.min.js';
|
} from '../../bundle/index.js';
|
||||||
|
import {
|
||||||
|
createWaku,
|
||||||
|
} from '../../bundle/lib/create_waku.js';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This example demonstrates how to use the js-waku minified bundle
|
* This example demonstrates how to use the js-waku minified bundle
|
||||||
@ -30,7 +32,7 @@
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
timestampDiv.innerHTML = '<p>Creating waku.</p>';
|
timestampDiv.innerHTML = '<p>Creating waku.</p>';
|
||||||
const node = await createWaku({ bootstrap: { default: true } });
|
const node = await createWaku({ defaultBootstrap: true });
|
||||||
|
|
||||||
timestampDiv.innerHTML = '<p>Starting waku.</p>';
|
timestampDiv.innerHTML = '<p>Starting waku.</p>';
|
||||||
await node.start();
|
await node.start();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user