Giter Club home page Giter Club logo

quickstart's Introduction

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

quickstart's People

Contributors

haydenyoung avatar haadcode avatar

Stargazers

Gyuri Lajos avatar al-sabr avatar  avatar

Watchers

Mark Henderson avatar  avatar  avatar  avatar

Forkers

philientaylor

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.