Skip to content

Commit

Permalink
feat: clone
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Jun 29, 2016
1 parent 8047029 commit 71ce99b
Show file tree
Hide file tree
Showing 10 changed files with 312 additions and 333 deletions.
4 changes: 1 addition & 3 deletions src/ipfs-npm/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const ipfsAPI = require('ipfs-api')
const debug = require('debug')
const path = require('path')
const os = require('os')
Expand All @@ -9,7 +8,6 @@ const tmp = os.tmpdir()

module.exports = {
log: log,
apiCtl: ipfsAPI('/ip4/127.0.0.1/tcp/5001'),
nodes: {
biham: '/ip4/188.40.114.11/tcp/8801/ipfs/QmToeN85brexqyXUnWnKfHFqhvucJPViw9AxQQkjLoULy4'
},
Expand All @@ -18,7 +16,7 @@ module.exports = {
port: '9876',
host: '127.0.0.1'
},
limit: 10,
writeLimit: 10,
registry: 'http://registry.npmjs.org/',
tmp: tmp,
error: path.join(__dirname, '../defaults', '404.json'),
Expand Down
17 changes: 17 additions & 0 deletions src/ipfs-npm/ipfs-client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
const ipfsAPI = require('ipfs-api')

module.exports = ipfs

function ipfs (options) {
if (!options || !options.url) {
options = {
url: '/ip4/127.0.0.1/tcp/5001'
}
}

// TODO
// 1. check if there is a node running (through IPFS_PATH)
// if not, spawn one

return ipfsAPI(options.url)
}
146 changes: 0 additions & 146 deletions src/ipfs-npm/registry-clone/clone.js

This file was deleted.

84 changes: 0 additions & 84 deletions src/ipfs-npm/registry-clone/files.js

This file was deleted.

15 changes: 0 additions & 15 deletions src/ipfs-npm/registry-clone/hooks.js

This file was deleted.

4 changes: 0 additions & 4 deletions src/ipfs-npm/registry-clone/ibs.js

This file was deleted.

Loading

0 comments on commit 71ce99b

Please sign in to comment.