Skip to content
This repository has been archived by the owner on Sep 30, 2023. It is now read-only.

Commit

Permalink
wip: pushed for demonstrating error
Browse files Browse the repository at this point in the history
  • Loading branch information
aphelionz committed Apr 29, 2020
1 parent a3a137d commit 1a2a3e9
Show file tree
Hide file tree
Showing 9 changed files with 922 additions and 550 deletions.
20 changes: 17 additions & 3 deletions config/factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,26 @@ module.exports = {
test: true,
disposable: true,
ipfsModule: require('ipfs'),
ipfsHttpModule: require('ipfs-http-client')
init: false,
start: false,
ipfsOptions: {
init: {
bits: 2048
},
config: {
Addresses: {
API: '/ip4/127.0.0.1/tcp/0',
Swarm: ['/ip4/0.0.0.0/tcp/0'],
Gateway: '/ip4/0.0.0.0/tcp/0'
},
Bootstrap: []
}
}
},
overrides: {
js: {},
go: {
args: ['--enable-pubsub-experiment'],
test: false,
ipfsHttpModule: require('ipfs-http-client'),
ipfsBin: require('go-ipfs-dep').path()
}
}
Expand Down
14 changes: 6 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
@@ -1,24 +1,22 @@
const Ctl = require('ipfsd-ctl')
const factoryCfg = require('./config/factory')
const factory = Ctl.createFactory(factoryCfg.defaults, factoryCfg.overrides)
exports.MemStore = require('./mem-store')
exports.swarm = require('./swarm')

// Different abstract-leveldown implementations
const implementations = require('./implementations')
const properLevelModule = implementations
.filter(i => i.key.indexOf('level') > -1)
.map(i => i.module)[0]
const defaultStorage = require('orbit-db-storage-adapter')(properLevelModule)
exports.defaultStorage = defaultStorage
exports.implementations = implementations

// Deprecated APIs
// startIpfs and stopIpfs will throw console.warn-ings
exports.config = require('./config')
exports.connectPeers = require('./connect-peers')
exports.defaultStorage = defaultStorage
exports.getIpfsPeerId = require('./get-ipfs-peer-id')
exports.ipfsFactory = factory
exports.implementations = implementations
exports.localSwarm = require('./local-swarm')
exports.spawnApi = require('./spawn-api')
exports.startIpfs = require('./start-ipfs')
exports.stopIpfs = require('./stop-ipfs')
exports.testApis = require('./test-apis.js')
exports.waitForPeers = require('./wait-for-peers')
exports.MemStore = require('./mem-store')
Loading

0 comments on commit 1a2a3e9

Please sign in to comment.