Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Commit

Permalink
docs: update example
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobheun committed Sep 22, 2020
1 parent 2447f1a commit 0d1eab8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
5 changes: 2 additions & 3 deletions examples/full-s3-repo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
const IPFS = require('ipfs')
const { createRepo } = require('datastore-s3')
const toBuffer = require('it-to-buffer')
const last = require('it-last')

;(async () => {
// Create the repo
Expand All @@ -29,10 +28,10 @@ const last = require('it-last')
console.log('Version:', version.version)

// Once we have the version, let's add a file to IPFS
const { path, cid } = await last(node.add({
const { path, cid } = await node.add({
path: 'data.txt',
content: Buffer.from(require('crypto').randomBytes(1024 * 25))
}))
})

console.log('\nAdded file:', path, cid)

Expand Down
5 changes: 2 additions & 3 deletions examples/full-s3-repo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
"dependencies": {
"aws-sdk": "^2.579.0",
"datastore-s3": "../../",
"ipfs": "^0.46.0",
"ipfs-repo": "^3.0.2",
"it-last": "^1.0.2",
"ipfs": "^0.50.2",
"ipfs-repo": "^6.0.3",
"it-to-buffer": "^1.0.2"
}
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
},
"peerDependencies": {
"aws-sdk": "2.x",
"ipfs-repo": "^3.0.2"
"ipfs-repo": "^6.0.3"
},
"contributors": [
"Jacob Heun <[email protected]>",
Expand Down

0 comments on commit 0d1eab8

Please sign in to comment.