Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit e00b96f

Browse files
skttdaviddias
authored andcommittedJul 19, 2017
fix: js-ipfs daemon config params (#914)
* Fix js-ipfs daemon config params - Respect `--enable-experimental-pubsub` - Don't overload repo config with cli args (fixes #868) - Typo * Treat cli args and config overload as seperate - Add an extra parameter for `HttpAPI` for `cliArgs`
1 parent d075667 commit e00b96f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
 

‎src/cli/commands/daemon.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module.exports = {
1616
default: false
1717
},
1818
'enable-pubsub-experiment': {
19-
type: 'booleam',
19+
type: 'boolean',
2020
default: false
2121
}
2222
},
@@ -25,7 +25,7 @@ module.exports = {
2525
console.log('Initializing daemon...')
2626

2727
const repoPath = utils.getRepoPath()
28-
httpAPI = new HttpAPI(process.env.IPFS_PATH, argv)
28+
httpAPI = new HttpAPI(process.env.IPFS_PATH, null, argv)
2929

3030
httpAPI.start((err) => {
3131
if (err && err.code === 'ENOENT' && err.message.match(/Uninitalized repo/i)) {

‎src/http-api/index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ function uriToMultiaddr (uri) {
1616
return `/ip4/${ipPort[0]}/tcp/${ipPort[1]}`
1717
}
1818

19-
function HttpApi (repo, config) {
19+
function HttpApi (repo, config, cliArgs) {
2020
this.node = undefined
2121
this.server = undefined
2222

@@ -55,8 +55,8 @@ function HttpApi (repo, config) {
5555
start: true,
5656
config: config,
5757
EXPERIMENTAL: {
58-
pubsub: true,
59-
sharding: config && config.enableShardingExperiment
58+
pubsub: cliArgs && cliArgs.enablePubsubExperiment,
59+
sharding: cliArgs && cliArgs.enableShardingExperiment
6060
},
6161
libp2p: libp2p
6262
})

0 commit comments

Comments
 (0)
This repository has been archived.