This repository was archived by the owner on Feb 12, 2024. It is now read-only.
File tree 6 files changed +9
-10
lines changed
exchange-files-in-browser
6 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 11
11
"keywords" : [],
12
12
"license" : " MIT" ,
13
13
"devDependencies" : {
14
+ "ipfs" : " file:../../" ,
14
15
"browserify" : " ^14.0.0" ,
15
16
"concat-stream" : " ^1.6.0" ,
16
17
"http-server" : " ^0.9.0"
Original file line number Diff line number Diff line change 1
1
'use strict'
2
2
3
- const IPFS = require ( '../../../src/core' ) // replace this by line below
4
- // var IPFS = require('ipfs')
3
+ var IPFS = require ( 'ipfs' )
5
4
6
- const node = new IPFS ( {
7
- repo : String ( Math . random ( ) + Date . now ( ) )
8
- } )
5
+ const node = new IPFS ( { repo : String ( Math . random ( ) + Date . now ( ) ) } )
9
6
10
7
node . once ( 'ready' , ( ) => console . log ( 'IPFS node is ready' ) )
11
8
Original file line number Diff line number Diff line change 12
12
"http-server" : " ^0.10.0"
13
13
},
14
14
"dependencies" : {
15
- "stream-buffers" : " ^3.0.1"
15
+ "stream-buffers" : " ^3.0.1" ,
16
+ "ipfs" : " file:../../"
16
17
}
17
18
}
Original file line number Diff line number Diff line change 1
- 'use strict'
2
1
/* global self */
2
+ 'use strict'
3
3
4
4
const $startButton = document . querySelector ( '#start' )
5
5
const $stopButton = document . querySelector ( '#stop' )
@@ -33,7 +33,7 @@ function start () {
33
33
updateView ( 'starting' , node )
34
34
35
35
// DEV: To test with latest js-ipfs
36
- const IPFS = require ( '../../../.. ' )
36
+ const IPFS = require ( 'ipfs ' )
37
37
node = new IPFS ( { repo : 'ipfs-' + Math . random ( ) } )
38
38
39
39
// EXAMPLE
Original file line number Diff line number Diff line change @@ -27,6 +27,6 @@ series([
27
27
if ( err ) { return cb ( err ) }
28
28
29
29
console . log ( '\nFile content:' )
30
- process . stdout ( data )
30
+ process . stdout . write ( data )
31
31
} )
32
32
] )
Original file line number Diff line number Diff line change 10
10
"license" : " MIT" ,
11
11
"dependencies" : {
12
12
"async" : " ^2.6.0" ,
13
- "ipfs" : " ^0.26.0 "
13
+ "ipfs" : " file:../../ "
14
14
}
15
15
}
You can’t perform that action at this time.
0 commit comments