make namesystem service come from a config file for future development

Signed-off-by: VoR0220 <catalanor0220@gmail.com>
This commit is contained in:
VoR0220 2018-05-25 12:25:02 -05:00
parent 6b1b849df7
commit f5a29c7f4d
3 changed files with 14 additions and 0 deletions

View File

@ -45,6 +45,7 @@ Config.prototype.loadConfigFiles = function(options) {
this.loadBlockchainConfigFile();
this.loadStorageConfigFile();
this.loadCommunicationConfigFile();
this.loadNameSystemConfigFile();
this.loadContractsConfigFile();
this.loadPipelineConfigFile();
@ -61,6 +62,7 @@ Config.prototype.reloadConfig = function() {
this.loadBlockchainConfigFile();
this.loadStorageConfigFile();
this.loadCommunicationConfigFile();
this.loadNameSystemConfigFile();
this.loadContractsConfigFile();
this.loadPipelineConfigFile();
this.loadContractsConfigFile();
@ -205,6 +207,16 @@ Config.prototype.loadStorageConfigFile = function() {
this.storageConfig = this._mergeConfig(configFilePath, configObject, this.env);
};
Config.prototype.loadNameSystemConfigFile = function() {
// todo: spec out names for registration in the file itself for a dev chain
var configObject = {
"default": {
"available_providers": ["ens"],
"provider": "ens"
}
}
}
Config.prototype.loadCommunicationConfigFile = function() {
var configObject = {
"default": {

View File

@ -105,6 +105,7 @@ class Engine {
"deployment": this.deploymentService,
"fileWatcher": this.fileWatchService,
"webServer": this.webServerService,
"namingSystem": this.namingSystem,
"ipfs": this.ipfsService,
"web3": this.web3Service,
"libraryManager": this.libraryManagerService,

View File

@ -135,6 +135,7 @@ class Embark {
engine.startService("pipeline");
engine.startService("deployment");
engine.startService("codeGenerator");
engine.startService("namingSystem");
// TODO: this should be just 'storage' and the storage should figure out the module
engine.startService(engine.config.storageConfig.provider);