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.
npm i
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
The config
npm package is used for configuration handling.
Configuration of ipfs and the http server are handled via json files in the config directory, allowing development and production configurations to be set via env
{
"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"
]
}
}
}
}
The http api is turned off by default. Enable it with -http
in the cli, or "http": true
in the config file.
Pins the orbitdb at ADDRESS
. Resumes on restart. Any follow
ing servers will also pin this database.
Forgets the orbitdb at ADDRESS
. Any follow
ing servers will also unpin this database.
- Drops all current streams
- Pins all orbitdb addresses in the list at PINNER_DB_ADDRESS.