diff --git a/db-config.js b/db-config.js new file mode 100644 index 0000000..a6227e4 --- /dev/null +++ b/db-config.js @@ -0,0 +1,34 @@ +'use strict' + +const path = require('path') + +const defaultOrbitDbDir = './heroNodeDb' + +const conf = { + repo: process.env.IPFS_PATH || path.join(defaultHeroNodeDbDir, '/ipfs'), + start: false, + EXPERIMENTAL: { + pubsub: true, + }, + config: { + Addresses: { + API: '/ip4/127.0.0.1/tcp/0', + Gateway: '/ip4/0.0.0.0/tcp/0', + Swarm: [ + '/ip4/0.0.0.0/tcp/0', + // '/dns4/ws-star.discovery.libp2p.io/tcp/443/wss/p2p-websocket-star', + ], + }, + }, + Discovery: { + MDNS: { + Enabled: true, + Interval: 1, + }, + }, +} + +module.exports = { + defaultDatabaseDir: defaultOrbitDbDir, + ipfsConfig: conf, +}