Ver Fonte

add setupConfigManager into the init process

utsushiiro há 7 anos atrás
pai
commit
caf6280665
1 ficheiros alterados com 9 adições e 0 exclusões
  1. 9 0
      src/server/crowi/index.js

+ 9 - 0
src/server/crowi/index.js

@@ -78,6 +78,8 @@ Crowi.prototype.init = function() {
       return self.setupSessionConfig();
     }).then(function() {
       return self.setupAppConfig();
+    }).then(function() {
+      return self.setupConfigManager();
     }).then(function() {
       return self.scanRuntimeVersions();
     }).then(function() {
@@ -205,6 +207,13 @@ Crowi.prototype.setupAppConfig = function() {
   });
 };
 
+Crowi.prototype.setupConfigManager = async function() {
+  const ConfigLoader = require('../service/config-loader');
+  const configLoader = new ConfigLoader(this.model('Config'));
+  const config = await configLoader.load();
+  console.log(config);
+};
+
 Crowi.prototype.setupModels = function() {
   var self = this
     ;