Better ipfs handling and default configs

This commit is contained in:
2018-04-19 00:40:33 +02:00
parent 424a2c4d02
commit a16cd862f6
2 changed files with 6 additions and 11 deletions

View File

@@ -4,6 +4,9 @@ const multihashes = require('multihashes');
class IPFS {
constructor(config) {
if (!config) {
config = {host: 'localhost', port: '5001', protocol: 'http'};
}
this._ipfsAPI = ipfsAPI(config);
this._config = config;
}