@lomray/microservice-gateway
Version:
Gateway microservice based on NodeJS & inverted json.
20 lines (16 loc) • 589 B
JavaScript
;
var tslib = require('tslib');
var microserviceHelpers = require('@lomray/microservice-helpers');
var index = require('../constants/index.js');
const defaultConfig = {
corsOptions: index.MS_CORS_CONFIG,
webhookUrl: index.MS_WEBHOOK_URL,
};
/**
* Get remote config
*/
const remoteConfig = () => tslib.__awaiter(void 0, void 0, void 0, function* () {
const conf = yield microserviceHelpers.RemoteConfig.get('config');
return Object.assign(Object.assign({}, defaultConfig), (conf !== null && conf !== void 0 ? conf : {}));
});
module.exports = remoteConfig;