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

Commit e8a32a7

Browse files
Pedro SantosAlan Shaw
Pedro Santos
authored and
Alan Shaw
committed
refactor: use echo-server start and stop functions as promises (#1191)
* refactor: use echo-server start and stop functions as promises * chore: update interface-ipfs-core version
1 parent f77819c commit e8a32a7

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

.aegir.js

+4-7
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
'use strict'
22

3-
const promisify = require('promisify-es6')
43
const createServer = require('ipfsd-ctl').createServer
54
const EchoServer = require('interface-ipfs-core/src/utils/echo-http-server')
65
const server = createServer()
76
const echoServer = EchoServer.createServer()
87

9-
const echoServerStart = promisify(echoServer.start)
10-
const echoServerStop = promisify(echoServer.stop)
118
module.exports = {
129
bundlesize: { maxSize: '246kB' },
1310
webpack: {
@@ -27,20 +24,20 @@ module.exports = {
2724
},
2825
hooks: {
2926
node: {
30-
pre: () => echoServerStart(),
31-
post: () => echoServerStop()
27+
pre: () => echoServer.start(),
28+
post: () => echoServer.stop()
3229
},
3330
browser: {
3431
pre: () => {
3532
return Promise.all([
3633
server.start(),
37-
echoServerStart()
34+
echoServer.start()
3835
])
3936
},
4037
post: () => {
4138
return Promise.all([
4239
server.stop(),
43-
echoServerStop()
40+
echoServer.stop()
4441
])
4542
}
4643
}

package.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,10 @@
8484
"cross-env": "^6.0.0",
8585
"detect-node": "^2.0.4",
8686
"go-ipfs-dep": "^0.4.22",
87-
"interface-ipfs-core": "^0.123.0",
87+
"interface-ipfs-core": "^0.124.0",
8888
"ipfsd-ctl": "^0.47.1",
8989
"ndjson": "^1.5.0",
9090
"nock": "^11.4.0",
91-
"promisify-es6": "^1.0.3",
9291
"pull-stream": "^3.6.14",
9392
"pump": "^3.0.0",
9493
"stream-equal": "^1.1.1"

0 commit comments

Comments
 (0)