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

Commit f50cd59

Browse files
committed
docs: update repo creation in custom repo example
1 parent 89fa357 commit f50cd59

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

examples/custom-ipfs-repo/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
const series = require('async/series')
44
const IPFS = require('ipfs')
5-
const Repo = require('ipfs-repo')
65

76
// Create our custom options
87
const customRepositoryOptions = {
@@ -36,10 +35,10 @@ const customRepositoryOptions = {
3635
locker: false
3736
}
3837

39-
// Initialize our repo and IPFS node
40-
const myRepo = new Repo('/tmp/custom-repo/.ipfs', customRepositoryOptions)
38+
// Initialize our IPFS node with the custom repo options
4139
const node = new IPFS({
42-
repo: myRepo
40+
repo: '/tmp/custom-repo/.ipfs',
41+
repoOptions: customRepositoryOptions
4342
})
4443

4544
// Test the new repo by adding and fetching some data

examples/custom-ipfs-repo/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,7 @@
1010
"license": "MIT",
1111
"dependencies": {
1212
"async": "^2.6.0",
13-
"datastore-fs": "^0.4.2",
14-
"ipfs": "file:../../",
15-
"ipfs-repo": "^0.18.7"
13+
"datastore-fs": "~0.4.2",
14+
"ipfs": "file:../../"
1615
}
1716
}

0 commit comments

Comments
 (0)