-
Notifications
You must be signed in to change notification settings - Fork 6
/
index.js
executable file
·34 lines (31 loc) · 1.27 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
'use strict';
const periodic = require('periodicjs');
const Promisie = require('promisie');
// const flatten = require('flat');
const utilities = require('./utilities');
const logger = periodic.logger;
// const extsettings = utilities.reactapp().settings;
// const oauth2ServerUtils = periodic.locals.extensions.get('periodicjs.ext.oauth2server');
// let initialReactAppConfig = {};
// let intialReactAppClient;
// let reactAppConfig = {};
module.exports = () => {
return new Promise((resolve, reject) => {
try {
periodic.status.on('configuration-complete', (status) => {
// const appEnvironment = periodic.settings.application.environment;
// const reactAppConfigFilepath = `content/config/extensions/periodicjs.ext.reactapp/${appEnvironment}.json`;
// const configurationDB = periodic.datas.get('configuration');
Promisie.all(utilities.controllerhelper.pullConfigurationSettings(), utilities.controllerhelper.pullComponentSettings())
.then(() => {
logger.silly('MANIFEST SETTINGS LOADED');
})
.catch(logger.silly.bind(logger, 'settings error'));
utilities.initialization.init();
});
return resolve(true);
} catch (e) {
return reject(e);
}
});
};