Added improvements to storage config

This commit is contained in:
emizzle 2018-05-31 13:19:25 +10:00
parent 30f0f4dc72
commit 6d77aae6de
6 changed files with 32 additions and 25 deletions

View File

@ -223,7 +223,8 @@ Config.prototype.loadStorageConfigFile = function() {
"host": "localhost", "host": "localhost",
"port": 5001, "port": 5001,
"getUrl": "http://localhost:8080/ipfs/" "getUrl": "http://localhost:8080/ipfs/"
} },
"dappConnection": [{"provider": "ipfs", "host": "localhost", "port": 5001, "getUrl": "http://localhost:8080/ipfs/"}]
} }
}; };

View File

@ -280,19 +280,6 @@ class Engine {
host: _options.host, host: _options.host,
port: _options.port port: _options.port
}); });
// this.registerModule('ipfs', {
// addCheck: this.servicesMonitor.addCheck.bind(this.servicesMonitor),
// storageConfig: this.config.storageConfig,
// host: _options.host,
// port: _options.port
// });
// this.registerModule('swarm', {
// addCheck: this.servicesMonitor.addCheck.bind(this.servicesMonitor),
// storageConfig: this.config.storageConfig,
// // TODO: this should not be needed and should be deducted from the config instead
// // the eth provider is not necessary the same as the swarm one
// bzz: this.blockchain.web3.bzz
// });
} }
web3Service(options) { web3Service(options) {

View File

@ -136,6 +136,11 @@
"deploying to swarm!": "deploying to swarm!", "deploying to swarm!": "deploying to swarm!",
"adding %s to swarm": "adding %s to swarm", "adding %s to swarm": "adding %s to swarm",
"successfully uploaded to swarm": "successfully uploaded to swarm", "successfully uploaded to swarm": "successfully uploaded to swarm",
"Cannot upload: {{platform}} node is not running on {{protocol}}://{{host}}{{port}}.": "Cannot upload: {{platform}} node is not running on {{protocol}}://{{host}}{{port}}.",
"Installing packages...": "Installing packages...",
"Next steps:": "Next steps:",
"open another console in the same directory and run": "open another console in the same directory and run",
"For more info go to http://embark.status.im": "For more info go to http://embark.status.im"
"Cannot upload: {{platform}} node is not running on {{protocol}}://{{host}}{{port}}.": "Cannot upload: {{platform}} node is not running on {{protocol}}://{{host}}{{port}}." "Cannot upload: {{platform}} node is not running on {{protocol}}://{{host}}{{port}}.": "Cannot upload: {{platform}} node is not running on {{protocol}}://{{host}}{{port}}."
"This is known to cause issues with some applications, please consider reducing your DApp path's length to 66 characters or less.": "This is known to cause issues with some applications, please consider reducing your DApp path's length to 66 characters or less." "This is known to cause issues with some applications, please consider reducing your DApp path's length to 66 characters or less.": "This is known to cause issues with some applications, please consider reducing your DApp path's length to 66 characters or less."
"no contracts found": "no contracts found", "no contracts found": "no contracts found",

View File

@ -4,14 +4,21 @@
"ipfs_bin": "ipfs", "ipfs_bin": "ipfs",
"provider": "ipfs", "provider": "ipfs",
"available_providers": ["ipfs"], "available_providers": ["ipfs"],
"host": "localhost", "upload": {
"port": 5001 "host": "localhost",
"port": 5001
},
"dappConnection": [
{"provider": "ipfs", "host": "localhost", "port": 5001, "getUrl": "http://localhost:8080/ipfs/"}
]
}, },
"development": { "development": {
"enabled": true, "enabled": true,
"provider": "ipfs", "provider": "ipfs",
"host": "localhost", "upload": {
"port": 5001, "host": "localhost",
"getUrl": "http://localhost:8080/ipfs/" "port": 5001,
"getUrl": "http://localhost:8080/ipfs/"
}
} }
} }

View File

@ -4,14 +4,21 @@
"ipfs_bin": "ipfs", "ipfs_bin": "ipfs",
"provider": "ipfs", "provider": "ipfs",
"available_providers": ["ipfs"], "available_providers": ["ipfs"],
"host": "localhost", "upload": {
"port": 5001 "host": "localhost",
"port": 5001
},
"dappConnection": [
{"provider": "ipfs", "host": "localhost", "port": 5001, "getUrl": "http://localhost:8080/ipfs/"}
]
}, },
"development": { "development": {
"enabled": true, "enabled": true,
"provider": "ipfs", "provider": "ipfs",
"host": "localhost", "upload": {
"port": 5001, "host": "localhost",
"getUrl": "http://localhost:8080/ipfs/" "port": 5001,
"getUrl": "http://localhost:8080/ipfs/"
}
} }
} }

View File

@ -17,7 +17,7 @@ describe("SimpleStorage", function() {
it("set storage value", async function() { it("set storage value", async function() {
await SimpleStorage.methods.set(150).send(); await SimpleStorage.methods.set(150).send();
let result = SimpleStorage.methods.get().call(); let result = await SimpleStorage.methods.get().call();
assert.equal(result, 150); assert.equal(result, 150);
}); });