From 03f8a698560242bfa527cf00904ba49bda8abb48 Mon Sep 17 00:00:00 2001 From: Hayden Young Date: Fri, 26 Jan 2024 10:22:44 +0000 Subject: [PATCH] docs: Use Level Blockstore. --- docs/GETTING_STARTED.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/GETTING_STARTED.md b/docs/GETTING_STARTED.md index 011d00b..55de905 100644 --- a/docs/GETTING_STARTED.md +++ b/docs/GETTING_STARTED.md @@ -206,11 +206,13 @@ import { createLibp2p } from 'libp2p' import { createHelia } from 'helia' import { createOrbitDB, IPFSAccessController } from '@orbitdb/core' import { LevelBlockstore } from 'blockstore-level' +import { LevelBlockstore } from 'blockstore-level' import { Libp2pOptions } from './config/libp2p.js' const main = async () => { + const blockstore = new LevelBlockstore('./ipfs') const libp2p = await createLibp2p(Libp2pOptions) - const ipfs = await createHelia({ libp2p }) + const ipfs = await createHelia({ libp2p, blockstore }) // create a random directory to avoid OrbitDB conflicts. let randDir = (Math.random() + 1).toString(36).substring(2)