A preconfigured OrbitDB instance which allows users to quickly "test drive" OrbitDB.
This repository provides convenience functions and IPFS and Libp2p configurations to deploy OrbitDB quickly and with minimal knowledge of Helia/Libp2p.
This project uses npm and nodejs.
npm i @orbitdb/liftoffTo launch a OrbitDB instance and open a database, run startOrbitDB:
import{startOrbitDB,stopOrbitDB}from'@orbitdb/liftoff'constorbitdb=awaitstartOrbitDB()constdb1=awaitorbitdb.open('db1')awaitdb1.add('hello world!')console.log(awaitdb1.all())awaitstopOrbitDB(orbitdb)OrbitDB Liftoff also includes default Libp2p configurations for Node.js and browser for basic connections between multiple peers:
import{createOrbitDB}from'@orbitdb/core'import{DefaultLibp2pOptions}from'@orbitdb/liftoff'constlibp2p=awaitcreateLibp2p({ ...DefaultLibp2pOptions})constipfs=awaitcreateHelia({ libp2p })constorbitdb=awaitcreateOrbitDB({ ipfs })constdb1=awaitorbitdb.open('db1')awaitdb1.add('hello world!')console.log(awaitdb1.all())MIT © 2024 OrbitDB Community