fix(examples): update using new bundles

This commit is contained in:
fryorcraken.eth 2022-08-06 00:41:41 +10:00
parent d560f8ce0e
commit 5f1ac595b6
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
2 changed files with 10 additions and 6 deletions

View File

@ -27,10 +27,12 @@
*/
import {
createWaku,
waitForRemotePeer,
WakuMessage
} from '../../dist/bundle.js';
} from '../../bundle/index.js';
import {
createWaku,
} from '../../bundle/lib/create_waku.js';
const statusDiv = document.getElementById('status');
const messagesDiv = document.getElementById('messages');
@ -56,7 +58,7 @@
// We are currently working on migrating this method to DNS Discovery.
//
// 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();
// Had a hook to process all incoming messages on a specified content topic.

View File

@ -14,10 +14,12 @@
<script type='module'>
import {
createWaku,
waitForRemotePeer,
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
@ -30,7 +32,7 @@
try {
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>';
await node.start();