diff --git a/src/cli/commands/daemon.js b/src/cli/commands/daemon.js index 9d4788657c..67a590956b 100644 --- a/src/cli/commands/daemon.js +++ b/src/cli/commands/daemon.js @@ -16,7 +16,7 @@ module.exports = { default: false }, 'enable-pubsub-experiment': { - type: 'booleam', + type: 'boolean', default: false } }, @@ -25,7 +25,7 @@ module.exports = { console.log('Initializing daemon...') const repoPath = utils.getRepoPath() - httpAPI = new HttpAPI(process.env.IPFS_PATH, argv) + httpAPI = new HttpAPI(process.env.IPFS_PATH, null, argv) httpAPI.start((err) => { if (err && err.code === 'ENOENT' && err.message.match(/Uninitalized repo/i)) { diff --git a/src/http-api/index.js b/src/http-api/index.js index 5746979b83..a0d849e9d2 100644 --- a/src/http-api/index.js +++ b/src/http-api/index.js @@ -16,7 +16,7 @@ function uriToMultiaddr (uri) { return `/ip4/${ipPort[0]}/tcp/${ipPort[1]}` } -function HttpApi (repo, config) { +function HttpApi (repo, config, cliArgs) { this.node = undefined this.server = undefined @@ -55,8 +55,8 @@ function HttpApi (repo, config) { start: true, config: config, EXPERIMENTAL: { - pubsub: true, - sharding: config && config.enableShardingExperiment + pubsub: cliArgs && cliArgs.enablePubsubExperiment, + sharding: cliArgs && cliArgs.enableShardingExperiment }, libp2p: libp2p })