This repository was archived by the owner on Sep 30, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -95,21 +95,21 @@ Run a simple program:
9595
9696// For js-ipfs >= 0.38
9797
98- const Log = require ( " ipfs-log" );
99- const IdentityProvider = require ( " orbit-db-identity-provider" );
100- const IPFS = require ( " ipfs" );
98+ import from Log ' ipfs-log'
99+ import IdentityProvider from ' orbit-db-identity-provider'
100+ import * as IPFS from ' ipfs'
101101
102102const start = async () => {
103- const identity = await IdentityProvider .createIdentity ({ id: " peerid" });
104- const ipfs = await IPFS .create ({ repo: " ./path-for-js-ipfs-repo" });
105- const log = new Log (ipfs, identity);
103+ const identity = await IdentityProvider .createIdentity ({ id: " peerid" })
104+ const ipfs = await IPFS .create ({ repo: " ./path-for-js-ipfs-repo" })
105+ const log = new Log (ipfs, identity)
106106
107- await log .append ({ some: " data" });
108- await log .append (" text" );
109- console .log (log .values .map ((e ) => e .payload ));
110- };
107+ await log .append ({ some: " data" })
108+ await log .append (" text" )
109+ console .log (log .values .map ((e ) => e .payload ))
110+ }
111111
112- start ();
112+ start ()
113113
114114// [ { some: 'data' }, 'text' ]
115115```
You can’t perform that action at this time.
0 commit comments