• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

orbitdb/orbit-db-pinner: A pinning service for Orbitdb, a decentralized database ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

orbitdb/orbit-db-pinner

开源软件地址:

https://github.com/orbitdb/orbit-db-pinner

开源编程语言:

JavaScript 95.3%

开源软件介绍:

orbitdb-pinner

A pinning service for orbitdb.

  • Pass it a single orbitdb address to pin.
  • Pin/unpin multiple orbitdb databases via http.
  • Have it follow the pinning list of another instance of the service.

This is the initial release. It is not production ready.

Installation

npm i

CLI usage

node pinner				    \\ start the server with current config file
node pinner -address ORBITDB_ADDRESS 	    \\ start the server and start replicating ORBITDB_ADDRESS
node pinner -http -port 1111	  	    \\ receive http connections. Port defaults to 3000
node pinner -follow  PINNER_DB_ADDRESS \\ replicate a database of orbitdb instances

Config

Configuration of ipfs and the http server are handled in the config directory. You can set the configuration of your node in the "config" folder. You can define if you want to use the node based on the ipfs api or an ipfs wrapper.

{
  "http": {
    "port": 3000,
    "enabled": true
  },
  "ipfsConfig": {
    "repo": "./orbitdb/pinner",
    "start": true,
    "EXPERIMENTAL": {
      "pubsub": true
    },
    "config": {
      "Addresses": {
        "Swarm": [
          "/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star"
        ]
      }
    }
  }
}

Http api

The http api is turned off by default. Enable it with -http in the cli, or "http": true in the config file.

\pin?address=ADDRESS

Pins the orbitdb at ADDRESS. Resumes on restart. Any following servers will also pin this database.

\unpin?address=ADDRESS

Forgets the orbitdb at ADDRESS. Any following servers will also unpin this database.

\follow?address=PINNER_DB_ADDRESS

  • Drops all current streams
  • Pins all orbitdb addresses in the list at PINNER_DB_ADDRESS.



鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap