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

Commit

Permalink
minor cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
hackergrrl committed Mar 24, 2016
1 parent 49b77b4 commit 8f757fb
Showing 1 changed file with 7 additions and 15 deletions.
22 changes: 7 additions & 15 deletions src/cli/commands/init.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
const Command = require('ronin').Command
const IpfsRepo = require('ipfs-repo')
const Ipfs = require('../../core')
const fsBlobStore = require('fs-blob-store')

module.exports = Command.extend({
desc: 'Initialize a local IPFS local node',
Expand All @@ -25,20 +26,14 @@ module.exports = Command.extend({
},

run: (bits, force, empty) => {
// TODO: what blob store do I use for browser? indexdb, right?
// well, this IS cli, and there's no browser cli :P
var someBlobStore = require('fs-blob-store')

// TODO: --force + --empty-repo will keep your default assets, right?
// TODO: where to init at? $IPFS_PATH var? homedir/.ipfs otherwise? sounds like a helper method job
const repo = new IpfsRepo('/tmp/my-little-repo', {
stores: {
keys: someBlobStore,
config: someBlobStore,
datastore: someBlobStore,
logs: someBlobStore,
locks: someBlobStore,
version: someBlobStore
keys: fsBlobStore,
config: fsBlobStore,
datastore: fsBlobStore,
logs: fsBlobStore,
locks: fsBlobStore,
version: fsBlobStore
}
})

Expand All @@ -52,9 +47,6 @@ module.exports = Command.extend({
console.error(err.toString())
process.exit(1)
}

// TODO: what console output is desirable? any? mimick go-ipfs?
console.log('res', res)
})
}
})

0 comments on commit 8f757fb

Please sign in to comment.