Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit d65f6f1

Browse files
committedOct 26, 2015
fix set config value, thanks to Victor!
1 parent 5b90cd6 commit d65f6f1

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed
 

‎gulpfile.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ var runSequence = require('run-sequence')
88
gulp.task('default', function (done) {
99
runSequence(
1010
'test:node',
11-
// 'test:browser',
11+
'test:browser',
1212
done)
1313
})
1414

@@ -22,8 +22,8 @@ gulp.task('test:node', function (done) {
2222
})
2323
.once('end', function () {
2424
stopDisposableDaemons(daemons, function () {
25-
process.exit()
26-
// done()
25+
// process.exit()
26+
done()
2727
})
2828
})
2929
})
@@ -79,21 +79,21 @@ function startDisposableDaemons (callback) {
7979
if (err) {
8080
throw err
8181
}
82-
/*
83-
ipfsNodes[key].setConfig('API.HTTPHeaders', 'Access-Control-Allow-Origin=*', function (err) {
84-
if (err) {
85-
throw err
86-
}
87-
*/
88-
ipfsNodes[key].startDaemon(function (err, ignore) {
82+
83+
ipfsNodes[key].setConfig('API', '{"HTTPHeaders": {"Access-Control-Allow-Origin": ["*"]}}', function (err) {
8984
if (err) {
9085
throw err
9186
}
9287

93-
apiAddrs[key] = ipfsNodes[key].apiAddr
94-
cb()
88+
ipfsNodes[key].startDaemon(function (err, ignore) {
89+
if (err) {
90+
throw err
91+
}
92+
93+
apiAddrs[key] = ipfsNodes[key].apiAddr
94+
cb()
95+
})
9596
})
96-
// })
9797
})
9898
})
9999
})

‎test/tmp-disposable-nodes-addrs.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"c":"/ip4/127.0.0.1/tcp/63289","a":"/ip4/127.0.0.1/tcp/63290","b":"/ip4/127.0.0.1/tcp/63303"}
1+
{"b":"/ip4/127.0.0.1/tcp/57590","a":"/ip4/127.0.0.1/tcp/57603","c":"/ip4/127.0.0.1/tcp/57610"}

0 commit comments

Comments
 (0)
This repository has been archived.