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

Fix js-ipfs daemon config params #914

Merged
merged 2 commits into from
Jul 19, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/cli/commands/daemon.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ module.exports = {
default: false
},
'enable-pubsub-experiment': {
type: 'booleam',
type: 'boolean',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

great catch

default: false
}
},
Expand All @@ -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)) {
Expand Down
6 changes: 3 additions & 3 deletions src/http-api/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
})
Expand Down