feat(store-js): only mount store protocol
This commit is contained in:
parent
eb98ef7f1c
commit
4fbdae63e1
|
@ -13,8 +13,9 @@
|
||||||
<div id='timestamp'></div>
|
<div id='timestamp'></div>
|
||||||
|
|
||||||
<script type='module'>
|
<script type='module'>
|
||||||
import {createLightNode} from 'https://unpkg.com/@waku/create@0.0.4/bundle/index.js'
|
import {defaultLibp2p, defaultPeerDiscovery} from 'https://unpkg.com/@waku/create@0.0.4/bundle/index.js'
|
||||||
import {waitForRemotePeer} from 'https://unpkg.com/@waku/core@0.0.6/bundle/lib/wait_for_remote_peer.js'
|
import {waitForRemotePeer} from 'https://unpkg.com/@waku/core@0.0.6/bundle/lib/wait_for_remote_peer.js'
|
||||||
|
import {wakuStore, WakuNode} from 'https://unpkg.com/@waku/core@0.0.6/bundle/index.js'
|
||||||
import {DecoderV0} from 'https://unpkg.com/@waku/core@0.0.6/bundle/lib/waku_message/version_0.js'
|
import {DecoderV0} from 'https://unpkg.com/@waku/core@0.0.6/bundle/lib/waku_message/version_0.js'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -27,7 +28,13 @@
|
||||||
const timestampDiv = document.getElementById('timestamp');
|
const timestampDiv = document.getElementById('timestamp');
|
||||||
|
|
||||||
timestampDiv.innerHTML = '<p>Creating waku.</p>';
|
timestampDiv.innerHTML = '<p>Creating waku.</p>';
|
||||||
const node = await createLightNode({defaultBootstrap: true});
|
|
||||||
|
const libp2p = await defaultLibp2p(
|
||||||
|
undefined,
|
||||||
|
{peerDiscovery: [defaultPeerDiscovery()]},
|
||||||
|
);
|
||||||
|
const store = wakuStore();
|
||||||
|
const node = new WakuNode({}, libp2p, store,);
|
||||||
|
|
||||||
timestampDiv.innerHTML = '<p>Starting waku.</p>';
|
timestampDiv.innerHTML = '<p>Starting waku.</p>';
|
||||||
await node.start();
|
await node.start();
|
||||||
|
|
Loading…
Reference in New Issue