npm stats
  • Search
  • About
  • Repo
  • Sponsor
  • more
    • Search
    • About
    • Repo
    • Sponsor

Made by Antonio Ramirez

pear-hyperdb

1.2.0

@mafintosh

npmSnykSocket
Downloads:2658
$ npm install pear-hyperdb
DailyWeeklyMonthlyYearly

pear-hyperdb

HyperDB model for Pear

npm install pear-hyperdb

Usage

const { spec, Model } = require('pear-hyperdb')
const HyperDB = require('hyperdb')
const rocks = HyperDB.rocks('./my-rocks.db', spec)
const model = new Model(rocks)
await model.db.ready()

await model.setDhtNodes([{ host: 'holepunch.to', port: 8080 }])
const nodes = await model.getDhtNodes()
console.log(nodes)

await model.close()

Modifying the schema

Edit the Hyperschema definition at build.js, then run:

npm run build

License

Apache-2.0