Skip to content

Commit

Permalink
Remove promisify (since already promisified)
Browse files Browse the repository at this point in the history
  • Loading branch information
enricomarino authored May 25, 2017
1 parent bd44b8f commit d59e875
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions examples/basics/index-es6.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
const fs = require('fs')
const os = require('os')
const path = require('path')
const promisify = require('promisify-es6')
// const IPFS = require('../../src/core')
// replace this by line below if you are using ipfs as a dependency of your
// project
Expand Down Expand Up @@ -39,16 +38,14 @@ node.version()
* Initialize the repo for this node
*/
.then(() => {
// we need to promisify node.init to return a promise
return promisify(node.init)({ emptyRepo: true, bits: 2048 })
return node.init({ emptyRepo: true, bits: 2048 })
})

/*
* Take the node online (bitswap, network and so on)
*/
.then(() => {
// we need to promisify node.start to return a promise
return promisify(node.start)()
return node.start()
})

/*
Expand Down

0 comments on commit d59e875

Please sign in to comment.