This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// spec: https://github.com/tc39/proposal-weakrefs | |
// the spec contains an [iterable WeakMap implementation](https://github.com/tc39/proposal-weakrefs#iterable-weakmaps) | |
// NOTE: this WeakSet implementation is incomplete, only does what I needed | |
// In Firefox Nightly, visit about:config and enable javascript.options.experimental.weakrefs | |
class IterableWeakMap extends Map { | |
set(k, v) { | |
super.set(new WeakRef(k), v) | |
} | |
forEach(fn) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Starting IPFS daemon... | |
287 docs per second, 287 docs in 1 seconds (Oplog: 287) | |
305 docs per second, 592 docs in 2 seconds (Oplog: 592) | |
285 docs per second, 877 docs in 3 seconds (Oplog: 877) | |
236 docs per second, 1113 docs in 4 seconds (Oplog: 1113) | |
180 docs per second, 1293 docs in 5 seconds (Oplog: 1293) | |
224 docs per second, 1517 docs in 6 seconds (Oplog: 1517) | |
217 docs per second, 1734 docs in 7 seconds (Oplog: 1734) | |
200 docs per second, 1934 docs in 8 seconds (Oplog: 1935) | |
192 docs per second, 2126 docs in 9 seconds (Oplog: 2126) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Starting IPFS daemon... | |
287 docs per second, 287 docs in 1 seconds (Oplog: 287) | |
305 docs per second, 592 docs in 2 seconds (Oplog: 592) | |
285 docs per second, 877 docs in 3 seconds (Oplog: 877) | |
236 docs per second, 1113 docs in 4 seconds (Oplog: 1113) | |
180 docs per second, 1293 docs in 5 seconds (Oplog: 1293) | |
224 docs per second, 1517 docs in 6 seconds (Oplog: 1517) | |
217 docs per second, 1734 docs in 7 seconds (Oplog: 1734) | |
200 docs per second, 1934 docs in 8 seconds (Oplog: 1935) | |
192 docs per second, 2126 docs in 9 seconds (Oplog: 2126) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const IpfsApi = require('ipfs-api'); | |
const OrbitDB = require('orbit-db'); | |
const Express = require('express'); | |
const DBManager = require('./dbmanager.js').DBManager | |
const api_port = process.env.API_PORT; | |
const ipfs_host = process.env.IPFS_HOST | |
const ipfs_port = process.env.IPFS_PORT | |
const orbitdb_dir = process.env.ORBITDB_DIR |