GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - orbitdb/examples: Implementing OrbitDB on various Javascript platforms.

BranchesTags
Open more actions menu

Latest commit

 

History

20 Commits
20 Commits

Folders and files

NameName
Last commit message
Last commit date
browser-es
browser-es
 
 
browser
browser
 
 
nodejs
nodejs
 
 
react
react
 
 
vue-vite
vue-vite
 
 
webpack
webpack
 
 
.gitignore
.gitignore
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
CONTRIBUTORS.md
CONTRIBUTORS.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
package-lock.json
package-lock.json
 
 

Repository files navigation

OrbitDB Examples

This repository contains some basic examples on how to implement OrbitDB in Javascript using various methods and frameworks.

Usage

Different frameworks and implementations are provided. Below are installation and usage details for each example.

To start, check out this repository:

git clone https://github.com/orbitdb/orbitdb-examples.git

Nodejs

Bundle OrbitDB in a node application.

The Node.js demo provides an example of how OrbitDB uses IPFS to replicate records across peers.

Install the 3rd party NPM packages and run the example:

cd ./nodejs
npm i

Run two terminal windows, terminal 1 and terminal 2.

In terminal 1, run the following:

node index.js

Once running, an OrbitDB address will be printed in the form /orbitdb/. Copy this before moving on to the next step.

In terminal 2, run index.js, passing the OrbitDB address you copied from the other window:

node index.js /orbitdb/<hash>

You should see the second peer add a record which the first peer should also print to the screen.

To close the peers and exit the two instances of the daemon, press ctrl+c in each of the terminal windows.

Browser

Run OrbitDB as a simple web app.

Launch a local web server. For example, you can use the Python's HTTP server:

cd ./browser
python3 -m http.server 8081

Browse to http://localhost:8081/

Browser ES

Run OrbitDB as a simple web app for ES compatible browsers (e.g. <script type="module"/>).

Launch a local web server. For example, you can use the Python's HTTP server:

cd ./browser-es
python3 -m http.server 8081

Browse to http://localhost:8081/

Webpack

Integrate OrbitDB with a webpacked app.

Install the 3rd party NPM packages:

cd ./webpack
npm i
npm run build

Launch a local web server. For example, you can use the Python's HTTP server:

python3 -m http.server 8081

Browse to http://localhost:8081/

React

Integrate OrbitDB in a ReactJS app.

Install the 3rd party NPM packages and run:

cd ./react
npm i
npm run start

Browse to the specified localhost URL in your web browser.

Vue + Vite

Integrate OrbitDB in a VueJS app.

Install the 3rd party NPM packages and run:

cd ./vue-vite
npm i
npm run dev

Browse to the specified localhost URL in your web browser.

License

MIT © 2023 OrbitDB Community

About

Implementing OrbitDB on various Javascript platforms.

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

9 stars

Watchers

3 watching

Forks

3 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.