Socket
Socket
Sign inDemoInstall

@orbitdb/quickstart

Package Overview
Dependencies
Maintainers
2
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@orbitdb/quickstart

A preconfigured instance which allows developers to "test drive" OrbitDB.


Version published
Weekly downloads
105
decreased by-2.78%
Maintainers
2
Weekly downloads
 
Created
Source

OrbitDB Quickstart

Matrix npm (scoped) node-current (scoped)

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.

Install

This project uses npm and nodejs.

npm i @orbitdb/quickstart

Usage

To launch a OrbitDB instance and open a database, run startOrbitDB:

import { startOrbitDB, stopOrbitDB } from '@orbitdb/quickstart'

const orbitdb = await startOrbitDB()
const db1 = await orbitdb.open('db1')
await db1.add('hello world!')
console.log(await db1.all())
await stopOrbitDB(orbitdb)

OrbitDB Quickstart 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/quickstart'

const libp2p = createLibp2p({ ...DefaultLibp2pOptions })
const ipfs = await createHelia({ libp2p })

const orbitdb = await createOrbitDB({ ipfs })

const db1 = await orbitdb.open('db1')
await db1.add('hello world!')
console.log(await db1.all())

License

MIT © 2024 OrbitDB Community

Keywords

FAQs

Package last updated on 19 Jan 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc